色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

python萬年歷和月歷采用哪個模塊

錢多多2年前14瀏覽0評論

python萬年歷和月歷采用哪個模塊?

import datetime import calendar def getYM(): ''' 這是一個簡單的年月輸入方法 ''' year = raw_input('Input Year: ') month = raw_input('Input Month: ') return year, month def saveGetYM(): ''' 這是一個安全的年月輸入方法 ''' while True: try: year_month = raw_input('Input year and month (year,mont): ') year, month = year_month.split(',') year, month = int(year), int(month) if 1900<=year<=2200 and 1<=month<=12: break except: continue return year, month year,month = saveGetYM() c = calendar.Calendar(1) print '-- %d --'%year for w in c.monthdatescalendar(year,month)[:7:]: print '|'.join([d.strftime('%m-%d') for d in w])