What is the difference between input() and raw_input() in Python?
What is the difference between input() and raw_input() in Python?
What is the difference between input() and raw_input() in Python?
solveurit24@gmail.com Changed status to publish February 13, 2025
input()(Python 3):- Reads a line from input, converts it to a string, and returns it.
raw_input()(Python 2):- Reads a line from input and returns it as a string (no conversion).
raw_input()was renamed toinput()in Python 3, and the oldinput()function (which evaluated the input as a Python expression) was removed.
Note:
In Python 3, use input() to read input as a string.
solveurit24@gmail.com Changed status to publish February 13, 2025