title: How to print variables depending on an operator in python?
body: <p>I am trying to code a simple calculator but I am having a problem. I can't seem to add, subtract, multiply, or divide two variables and print them. I am trying to code so the user can input the numbers along with the operator. Any ideas? </p>
  
  <p>Thanks, </p>
  
  <p>SanguineL</p>
  
  <pre><code>number1 = raw_input ("What is the first number?")
  operator = raw_input ("What is the operator?")
  number2 = raw_input ("What is the second number?")
  
  elif operator == +
      answer = number1 + number2
  elif operator == -
      answer = number1 - number2
  elif operator == *
      answer = number1 * number2
  elif operator == /
      answer = number1 / number2
  print answer
  </code></pre>