for instance, i have a txt data called \'mazeline\' like this:
abcd
cdae
korp
So i first made 3 lists:
mazeline = readmaze.spli
Just put the lists inside another list
res = [mline0, mline1, mline2]
more simply, you can skip the intermediate variables and use a list comprehension
res = [list(mline) for mline in readmaze.split()]
Try this list comprehension:
[[int(i) for i in line.strip()] for line in open('file/path')]