摘要: 1 import datetime 2 3 print(' 计算从出生到现在你生活了多少天,多少小时,多少秒 ') 4 day_srt = input('请按 年-月-日 的格式输入日期:') 5 t_day = datetime.datetime.strptime(day_srt,'%Y-%m-% 阅读全文
posted @ 2020-05-16 18:15 不着魔,不成佛 阅读(117) 评论(0) 推荐(0)
摘要: 1 def Brithday(id): 2 year = id[6:10] 3 month = id[10:12] 4 date = id[12:14] 5 sex = id[16:17] 6 sex = int(sex) 7 if sex % 2: 8 sex = '男' 9 else: 10 s 阅读全文
posted @ 2020-05-16 18:02 不着魔,不成佛 阅读(180) 评论(0) 推荐(0)