For Python 3.x, use input()
. For Python 2.x, use raw_input()
. Don’t forget you can add a prompt string in your input()
call to create one less print statement. input("GUESS THAT NUMBER!")
.
More Related Contents:
- How to treat raw_input variables as integers [closed]
- How to set time limit on raw_input
- Python: Problem with raw_input reading a number
- raw_input and timeout [duplicate]
- Masking user input in python with asterisks
- Tab completion in Python’s raw_input()
- How to let a raw_input repeat until I want to quit?
- How do I check if raw input is integer in python 2.7?
- Backwards-compatible input calls in Python
- Behaviour of raw_input()
- Inventory condition so I can only add item once and win condition
- More ‘Pythonic’ way to write asymmetric if-else statement
- How to find elements by class
- How do I run Selenium in Xvfb?
- Python – PIP install trouble shooting – PermissionError: [WinError 5] Access is denied
- How to JSON serialize sets?
- What causes a Python segmentation fault?
- Python webbrowser.open() to open Chrome browser
- Too many different Python versions on my system and causing problems
- Is it possible to modify variable in python that is in outer, but not global, scope?
- Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory \\METADATA
- numpy get index where value is true
- Is the behaviour of Python’s list += iterable documented anywhere?
- Python: how to “kill” a class instance/object?
- Uniqueness for list of lists
- python_2_unicode_compatible error
- Unresolved import: models
- Split string at commas except when in bracket environment
- How to display charts in Spyder
- Why do I get “TypeError: not all arguments converted during string formatting” trying to check for an even/odd number?