+ 3
How does input()/raw_input() work in Python 3?
I took the Python course over the span of a couple of days, but I didnât understand a lot of it: including how to get people to input text into a game. Iâve done a ton of research, but I canât figure it out. I even tried searching through the course again, but I didnât find anything helpful. For a clearer example: I watched this one person on YouTube use âanswerâ instead of âtxtâ [answer=Input()]. Iâve tried both and neither of them work.
5 Answers
+ 4
đ€
What's the code you're trying to run?
+ 3
If I understand your question correctly, could it be because you're capitalizing the input() function? Python is case sensitive, so for it to work you must use input() rather than Input()
+ 3
no, thatâs not it. I have input written at lowercase. This forum just kept trying to capitalize input for some reason. I tried to fix it but I stopped trying.
+ 3
ok. wow. never mind. I forgot that I set the code playground to swift because I wanted to get back into learning Swift. Then I tried coding in Python. Thatâs the problem.
0
input is for version 3.6.5 but raw input for version 2.7.5