A variable doesn't want to change it's value

This code doesn’t want to change the value of a part of a list in a for loop…
I’ve checked, all of the names exist and the variable I’m trying to change the part of the list has a valid value.
Is there something I’m not noticing?

for i in range(len(string)):
if string[i]=="varInt":
elif string[i]=="varFloat":
elif string[i]=="varStr":

P.S. I checked with Python tutor, but I couldn’t find anything in the code visualization that could help me, the program just goes over the line without changing anything…

More context is needed (what is string?) but regardless of that it is safe to say that == is not assignment, it compares whether value of objects is equal. To assign one must use =. If name to be believed and string is actually string then there are lot of other problems as well.

1 Like

Thank you, I didn’t pay attention when pasting lines and accidentally left == except for =…
This fixed it.