Python 练习实例10
2016-01-12
题目:暂停一秒输出。程序分析:无。程序源代码: ! usr bin python -*- coding: UTF-8 -*-import timeprint time strftime(& 39;%Y-%m-%d %H:%M:%S& 39;,time localtime(time time())) 暂停一秒time
题目:暂停一秒输出。
程序分析:无。
程序源代码:
#!/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()))
以上实例输出结果为:
2015-10-21 17:48:40 2015-10-21 17:48:41
相关文章
最新文章
热点推荐