SHARE
TWEET

Not Equal Fixed

Atyeo Nov 24th, 2012 34 Never
  1. while True:
  2.     selection = int(raw_input("Please select option 1 or 2 ->> "))
  3.  
  4.     if selection not in [1, 2]:
  5.         print "Please select either option 1 or 2"
  6.     elif selection == 1:
  7.         print "You have selected option 1"
  8.         break
  9.     else:
  10.         print "You have selected option 2"
  11.         break
RAW Paste Data
Top