title: If statement where a variable is equal to a special character [Python]
body: <p>I've made a simple calculator where you can enter unlimited numbers in one operator(i.e. addition) but every time I run it, it gives an error:</p>
  
  <pre><code>"Traceback (most recent call last):
    File "C:\Users\My own\Desktop\1.py", line 68, in &lt;module&gt;
  choose_operation()
    File "C:\Users\My own\Desktop\1.py", line 9, in choose_operation
      addition()
    File "C:\Users\My own\Desktop\1.py", line 26, in addition
      c = input("Number:")
    File "&lt;string&gt;", line 1
      +
      ^
  SyntaxError: unexpected EOF while parsing"
  </code></pre>
  
  <p>I only included two functions here which are the function for selecting the operation to be used and the addition function so it would remain short as possible. The problem is: Whenever I tried to put "c == '+'" in the second to the last line, I get the error mentioned above. What I'd like to happen is that when a user inputs '+', it calls the function 'choose_operation' so I could get back to choosing an operation. What went wrong? Here's my code.</p>
  
  <pre><code>def choose_operation():
      print "choose operator"
      print "1. Addition"
      print "2. Subtraction"
      print "3. Multiplication"
      print "4. Division"
      choice = input("choice = ")
      if choice == 1:
          addition()
      elif choice == 2:
          subtraction()
      elif choice == 3:
          multiplication()
      elif choice == 4:
          division()
      else:
          print "Select numbers from 1 to 4"
          choose_operation()
  
  def addition():
      a = input("Number:")
      b = input("Number:")
      sum = a + b
      print sum
      while True: #I put this here so it can keep on adding numbers
          c = input("Number:")
          sum = sum + c
          print sum
          if c == '+':
              choose_operation()
  </code></pre>