Python comprend des exercices 10
Titre: deuxième sortie de pause.
Analyse du programme: Aucun.
Source Code:
#!/usr/bin/python # -*- coding: UTF-8 -*- import time print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time())) # 暂停一秒 time.sleep(1) print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
L'exemple ci-dessus sortie est:
2015-10-21 17:48:40 2015-10-21 17:48:41