import calendar year = raw_input("Enter a year: ") while year != '': print calendar.calendar(int(year)) year = raw_input("Enter a year: ")