(on python 3), and raw_input
(on python 2) return strings. That is just what they do. Once you get your string you have to convert it. You can of course immediately convert the return of your input as follows (on python 3):
- Code: Select all
one=int(input("Type either 1 or 0 here:"))
but either way you will have to add some code so your program doesn't crash if your user enters something that isn't a number.input
on python 2 did what you are expecting but it was and is a horrible idea so it was removed in python 3 and no one who still codes in python 2 uses it.
What I'm trying to achieve doesn't really matter
This is untrue. You are the only one who knows what you expect your code to do. We can't know from incorrectly written code or ill conceived ideas what you are expecting it to do.