下载安卓APP箭头
箭头给我发消息

客服QQ:3315713922

Python 的练习实例10

作者:弯弯的月亮     来源: https://www.runoob.com/python/python-exercise-example10.html点击数:898发布时间: 2020-12-14 11:51:38

标签: python基础教程python下载python爬虫

  程序源代码:

  实例

  #!/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

  题目:暂停一秒输出,并格式化当前时间。

  程序分析:无。

赞(14)
踩(0)
分享到:
华为认证网络工程师 HCIE直播课视频教程