title: Set a string to a letter inputted by a user
body: <p>I'm writing something in python, and I don't understand why this section of code isn't working.</p>
  
  <pre><code>m = 1
  f = 0
  gender_choice = False
  
  while gender_choice == False:
      gender = input('Are you male or female? Type m for male or f for female. ')
      if gender == m or gender == f:
      print
      gender_choice = True
  else:
      print
      print "Hey, this is a text based game. Read and follow bro."
  
  print gender
  </code></pre>
  
  <p>I think I understand that there is an issue with setting a string to "m" or "f", but unless I change raw_input to input, the loop will continue. Also, as is currently written, if the user enters anything other than a number, m, or f, I will get an error that the string is undefined, for example, if they enter "y".</p>