def pleasantries(): print "hello this is a game" def getInput(): return raw_input("What do you choose? ") def game() pleasantries() human = getInput() while human not in legal: print "enter something proper" getInput() #now they have something proper #play game