About 1,110,000 results
Open links in new tab
  1. How do I do simple user input in python? - Stack Overflow

    25 You can use the input() function to prompt the user for input, and float to convert the user input from a string to a float:

  2. python - Getting user input - Stack Overflow

    In Python 3, it's just input() - caution : there is an input method in 2.x too, but it eval ()s the input and is therefore evil. Any way to write a prompt that can work for both? @Agostino try: input = raw_input ; …

  3. python - How can I read inputs as numbers? - Stack Overflow

    Dec 8, 2013 · Python 2.x There were two functions to get user input, called input and raw_input. The difference between them is, raw_input doesn't evaluate the data and returns as it is, in string form. …

  4. python - Creating if/else statements dependent on user input - Stack ...

    Creating if/else statements dependent on user input Asked 11 years, 1 month ago Modified 1 year, 8 months ago Viewed 51k times

  5. python - User input and command line arguments - Stack Overflow

    634 To read user input you can try the cmd module for easily creating a mini-command line interpreter (with help texts and autocompletion) and raw_input (input for Python 3+) for reading a line of text …

  6. Asking the user for input until they give a valid response

    Apr 25, 2014 · The simplest way to accomplish this is to put the input method in a while loop. Use continue when you get bad input, and break out of the loop when you're satisfied. When Your Input …

  7. python - Getting a hidden password input - Stack Overflow

    By default, the password input will be fully invisible. If you want to show asterisks in place of the user typed password, use the echo_char parameter added in Python 3.14.

  8. python - How do I store user input into a list? - Stack Overflow

    Apr 4, 2015 · For example if I have a user input called num: num = int (input ('Enter numbers')) I want to be able to store these numbers into a list to be manipulated. How can I go about this? Thanks.

  9. python - Get a list of numbers as input from the user - Stack Overflow

    numbers = input() print(len(numbers)) the input [1,2,3] and 1 2 3 gives a result of 7 and 5 respectively – it seems to interpret the input as if it were a string. Is there any direct way to make a list out of it? …

  10. python - How do I convert user input into a list? - Stack Overflow

    I'm wondering how to take user input and make a list of every character in it. magicInput = input ('Type here: ') And say you entered "python rocks" I want a to make it a list something like this