About 50 results
Open links in new tab
  1. python - Getting user input - Stack Overflow

    Do you want the file name to come from user input or a command line argument? (e.g. python myScript.py inputfile.txt)

  2. 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:

  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 - How do I read from stdin? - Stack Overflow

    How do I read from standard input (stdin)? There's a few ways to do it. sys.stdin is a file-like object on which you can call functions read or readlines if you want to read everything or you want to read …

  5. python - How to read keyboard input? - Stack Overflow

    input('Enter your input:') if you use Python 3. And if you want to have a numeric value, just convert it:

  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 - 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 …

  8. Python - User input data type - Stack Overflow

    Apr 6, 2016 · Python - User input data type Asked 9 years, 9 months ago Modified 9 years, 9 months ago Viewed 15k times

  9. How can I check if string input is a number? - Stack Overflow

    What do you mean "not floats"? int() can only return an integer. Do you mean userInput could be a float? That's only true in Python 2, in which case don't use input() since it evaluates user input which is …

  10. Python Creating User Input Form and Converting Inputs into Data Frame

    Dec 16, 2016 · I'm trying to create a dynamic user input form inside iPython / Jupyter 3. I want the user to be able to specify the following by entering things into input boxes: Part of Day Start time for Day ...