title: Command-line input causes SyntaxError
body: <p>I have a simple Python question that I'm having brain freeze on.  This code snippet works.  But when I substitue "258 494-3929" with phoneNumber, I get the following error below:</p>
  
  <pre><code># Compare phone number  
   phone_pattern = '^\d{3} ?\d{3}-\d{4}$'
  
   # phoneNumber = str(input("Please enter a phone number: "))
  
   if re.search(phone_pattern, "258 494-3929"):  
          print "Pattern matches"  
    else:  
          print "Pattern doesn't match!"  
  </code></pre>
  
  <hr>
  
  <pre><code> Pattern does not match  
   Please enter a phone number: 258 494-3929  
   Traceback (most recent call last):  
      File "pattern_match.py", line 16, in &lt;module&gt;  
        phoneNumber = str(input("Please enter a phone number: "))  
      File "&lt;string&gt;", line 1  
        258 494-3929  
            ^
    SyntaxError: invalid syntax
  
     C:\Users\Developer\Documents\PythonDemo&gt;  
  </code></pre>
  
  <p>By the way, I did <code>import re</code> and tried using <code>rstrip</code> in case of the <code>\n</code></p>
  
  <p>What else could I be missing?</p>