边学边干,做个笔记
#!/usr/bin/python # -*- coding: UTF-8 -*- #引入time import time # 对时间进行格式化 print time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())