About 273,000 results
Open links in new tab
  1. Python - How to take user input and use that in function

    Feb 4, 2024 · In Python 2, you should accept user inputs with raw_input(): Check this. x=int(raw_input("Enter first number")) y=int(raw_input("Enter second number")) Please follow a …

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

    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 …

  3. Create a tuple from an input in Python - Stack Overflow

    You could interpret the input as Python literals with ast.literal_eval(): import ast a = ast.literal_eval(input('some text: ')) This function will accept any input that look like Python …

  4. 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. ... Enter String:python ...

  5. How to give jupyter cell standard input in python?

    Jan 23, 2016 · Nothing worked as long as input() was the first line, but after putting some arbitrary statements before the first input(), all of the input()s just started working. So, maybe try a …

  6. python - Getting user input - Stack Overflow

    @Agostino try: input = raw_input ; except NameError: pass; And then use input freely. (Basically, if raw_input exists, assign it to the name input. If not, well, you're in python3). Semicolons are …

  7. python - Taking input from the user in Tkinter - Stack Overflow

    Apr 10, 2023 · Python storing user input. 0. How to accept user input using Tkinter? 0. providing user input tkinter. 0 ...

  8. datetime - Python 3.2 input date function - Stack Overflow

    Jan 1, 2013 · The input() method can only take text from the terminal. You'll thus have to figure out a way to parse that text and turn it into a date. You could go about that in two different …

  9. User input boolean in python - Stack Overflow

    Feb 16, 2018 · I am trying to have a user input whether or not they like spicy food and the output is supposed to be a boolean but I don't seem to be getting an output with my code below: def …

  10. Visual Studio Code - input function in Python - Stack Overflow

    While all my code executed in the internal debugger, the INPUT code would not. I could not use the integrated terminal for input. I applied the configuration by Keshan Nageswaran. I did, …