On Sat, Aug 23, 2014 at 10:16 AM, Mimi Ou Yang <mimiouy...@hotmail.com> wrote: > age = input("K") > > age = int(age) > > if (age == 1) or (age == 2) or (age == 3) or (age == 4): > print ("LOL") > > else: > print ("K") > > > > Is there a shorter way to do this program??? > age = int(input("K")) if age in (1,2,3,4): print "LOL") else: print age # or do you really want to print "K" ? > > > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor >
-- Joel Goldstick http://joelgoldstick.com _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor