I want the user to input an integer (6 digits long, so 123456 rather than just 1), and then convert that input into a list, [1,2,3,4,5,6].
I tried this:
user_input = list(input("Please enter an 8 digit number")
numbers = [int(i) for i in user_input]
I want to be able to perform mathematical stuff with the numbers list, but I keep getting the error "int is not iterable". To be frank, I'm not entirely sure what I'm doing, or sure that the "numbers = [...] " is even necessary, or if it should just be numbers = user_input. Trying numbers = [i for i in user_input] gets the same error.
Also, I realise I could either run a loop to get each number from the user, or ask them to use commas in between each in order to use the .split(","), but I'd rather not as it seems messy to the user.
Edit: I've been switching things between versions, so sorry for any confusion. This was written in 2.7, though I intend to use Python 3.