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
'abc' to a : [['a'],['b'],['c']].
so the script i wrote was:
s='some string'
t=[[0]]*len(s)
for i in range(len(s)):
t[i][0] = list(s)[i]
return t
the problem is that this returns [['g'],['g'],..,['g']] instead of [['s'],['o'],..,['g']).
I found another way to achieve that, but i can't seem to find the problem of this script. So,if anyone could help me, i would really appreciate it. Thanks in advance.