import time time.strftime('%Y%m',time.localtime(time.time()))#获取当前年月 转载于:https://www.cnblogs.com/CQ-LQJ/p/5368270.html