About 93,700 results
Open links in new tab
  1. raw_input function in Python - Stack Overflow

    Apr 6, 2011 · The "input" function converts the input you enter as if it were python code. "raw_input" doesn't convert the input and takes the input as it is given. Its advisable to use raw_input for everything.

  2. How do I use raw_input in Python 3? - Stack Overflow

    Jun 5, 2009 · I'm learning python as well and found one difference between input() and raw_input(). a = input() will take the user input and put it in the correct type. Eg: if user types 5 then the value in a is …

  3. What's the difference between `raw_input()` and `input()` in Python 3?

    In Python 2, raw_input() returns a string, and input() tries to run the input as a Python expression. Since getting a string was almost always what you wanted, Python 3 does that with input().

  4. Use of input/raw_input in python 2 and 3 - Stack Overflow

    This is because, In python 2, raw_input() accepts everything given to stdin, as a string, where as input() preserves the data type of the given argument (i.e. if the given argument is of type int, then it will …

  5. Understanding raw_input function in Python - Stack Overflow

    Mar 20, 2015 · 4 When you type a response to the raw_input () you finish by entering a newline. Since each character you enter is also displayed as you type, the newline shows up as well. If you modified …

  6. python - Diferencia entre input () y raw_input () - Stack Overflow en ...

    Si usas Python 2.x raw_input hace lo mismo que input() en Python 3.x (acepta cualquier cadena y retorna siempre un objeto str) mientras que input() solo acepta expresiones que sean …

  7. python - Differences between `input` and `raw_input` - Stack Overflow

    3 input () vs raw_input () raw_input collects the characters the user types and presents them as a string. input () doesn't just evaluate numbers but rather treats any input as Python code and tries to execute …

  8. pythonでのraw_input()の使い方 - スタック・オーバーフロー

    May 1, 2018 · python初心者です.whileループ内でコンソールからの入力の取得をinput()もしくはraw_input()で取得したいのですが,何も入力がない場合はスルーして次のコマンドを実行するよう …

  9. python - How can I mock user input (from "input" in 3.x, or "raw_input ...

    Small note just on Python naming conventions - variables which are required by the parser but not used are typically named _, as in the case of the lambda's unused variable (which is normally the prompt …

  10. How can I read raw mouse input with Python? - Stack Overflow

    May 16, 2024 · I know that PyAutoGUI and Pynput can read mouse inputs, but they can only read your coordinates on the screen. I'm trying to create a macro recorder but I need to be able to read the …