Latest web development tutorials

Python Übung Beispiel 9

Python 100 Li Python 100 Li

Titel: zweite Pause ausgegeben.

Programmanalyse: Keine.

Source Code:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

import time

myD = {1: 'a', 2: 'b'}
for key, value in dict.items(myD):
	print key, value
	time.sleep(1) # 暂停 1 秒

Der Ausgang ist über Beispiele (es wird eine Pause Effekt):

1 a
2 b

Python 100 Li Python 100 Li