I'm trying to restrict the users input to the selected characters only.
"W" "w" or "L" "l"
Anything else entered, an error message should display.
Can anyone please look at this and tell me what I'm doing wrong?
# User Enters either W = Win and L = Loss # If user types in other W w, Ll display error will display def main(): print "Please use W or L to input the results of the game" print win_loss_code = raw_input('Enter W for Win or L for Loss: ') if win_loss_code == 'W' or 'w': print "You won" if win_loss_code == 'L' or 'l': print "you lost" else: print "Error" print "Please use only W or L" main()