Sorry, forgot to have tutor in the CC. On Sun, Mar 31, 2013 at 12:08 PM, Soliman, Yasmin <ysoli...@uncc.edu> wrote: > Sure here it is: > > import weekday_string1 > while True: > ryear = raw_input("year= ") > print ryear > if not ryear.isdigit(): > print '\nThank you for using this program! Bye.' > break
if ryear == 'Quit': print '\nThank you for using this program! Bye.' break This will exit out of the While loop. So, if you have code after the while loop, they will be executed. If you want to completely exit the program, use the sys.exit() function from the sys module. Does that help? -Amit. -- http://amitsaha.github.com/ _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor