So I have a for loop, and I want to assign all of the results from that loop into separate variables to use later in the code.
If I use a code like this:
answer = input('enter a message')
for value in answer:
var = value
print var
Then the variable var will just hold the value of the last item in the answer, is there a way to make a new variable for each item in their answer, e.g. var1, var2, var3 etc. instead of just one variable with the last item in it?
I'm not trying to get something that I've entered into a list into the variables, I want it to put the individual letters from the user's answer into separate variables, not sure if this is the same sort of thing, but the answers to similar questions don't seem to have the desired effect.
Sorry if this is a simple question, but I can't figure out how to get it right