I seem to have a problem with my list generating script. I'm trying to convert a string into a list of string-lists, in order to use it in a specific fonction.
For exemple I want to convert the string
for i in range(len(s)):
t[i] = list(s)[i]
This is a classic mistake:
[]*n creates a list of
n references to a unique object
. Use this instead to create a list of
n different objects all equal to
[ for i in range(n)]. This way, you can then change the value of each of them without affecting the others.