# # Reading "yes" or something else # # Matt Bishop, MHI 289I, Winter 2018 # import string # # read in a string and print it, with surrounding quotes # inp = raw_input("Enter your input (y/n only) ") print '"' + inp + '"' # # delete leading, trailing spaces and print it, with # surrounding quotes # inp1 = inp.lstrip() print '"' + inp1 + '"' # # make everything lower case and print it, with # surrounding quotes # inp2 = inp1.lower() print '"' + inp2 + '"' # # now if it begins with "yes", say so; otherwise say # it does not # if inp2.startswith("yes"): print "yes" else: print "not yes"