You should use raw_input
instead of input
, and you don’t have to call str
, because this function returns a string itself:
phoneNumber = raw_input("Please enter a phone number: ")
More Related Contents:
- Read Unicode characters from command-line arguments in Python 2.x on Windows
- Is it possible to run python SimpleHTTPServer on localhost only?
- What exactly do “u” and “r” string flags do, and what are raw string literals?
- How can I force division to be floating point? Division keeps rounding down to 0?
- Why does the division get rounded to an integer?
- How can I read large text files line by line, without loading it into memory?
- How do I keep Python print from adding newlines or spaces? [duplicate]
- How to get string objects instead of Unicode from JSON?
- f-strings giving SyntaxError?
- Python unexpected EOF while parsing
- How to print variables without spaces between values [duplicate]
- Why does Python print unicode characters when the default encoding is ASCII?
- How can I hide the console window in a PyQt app running on Windows?
- Why can’t I use the method __cmp__ in Python 3 as for Python 2?
- What is the difference between encode/decode?
- How can I get 2.x-like sorting behaviour in Python 3.x?
- What does “ mean in Python?
- Handling \r\n vs \n newlines in python on Mac vs Windows
- Python Flask Render Text from Variable like render_template
- compare lines in a file with a string
- Determine if 2 lists have the same elements, regardless of order? [duplicate]
- How to read a CSV file from a URL with Python?
- Read from File, or STDIN
- Printing a string prints ‘u’ before the string in Python?
- How do implicit relative imports work in Python?
- subprocess call ffmpeg (command line)
- What arguments does Python sort() function have?
- win32: simulate a click without simulating mouse movement?
- Python: How to get input from console while an infinite loop is running?
- Command line execution in different folder