I’ll do my best to not make things overly complicated. Python 3.11 is old and so there is newer versions of it now. I don’t know who might need the question answered but I have noticed the same question over and over again. So to whoever this answer might benefit, I hope this helps. Let’s get started:
First we a variable to be assigned. That means we already have in mind a task for it.
I will use “X”
Next, is the traceback error in which I give the variable a meaning. Because x is x then nothing will be the error. The ‘y’ before the string is the command of raw_input. It is safe to assign it, a ‘string’.
Such as X = y(‘string’).
Finally is to add a print command such as ‘print(x)’ under.
It should look something like this:
X=input y(‘what is your name?’)
print(x)
Make the necessary changes and remember to keep both variables with the intended purpose.
Now that question should spit back any raw input.
I tried Python 3.11 in 2024 for the first time and was asking about raw inputs but there was no working that of an answer before.
Mauro Gonzalez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.