I am stuck at one point where I want to create a list of lists something like
[ [3,2,5], [4,8,1]...]
I have written the following code but it prints [3,2,5,4,8,1,….] and not the way I want the structure to be. Any help would be appreciated.
skill=[]
db=[ [] ]
file=open(filePath,'r')
for line in file:
for word in line.split(','):
skill.append(itDictionary[word.strip()])
db.append(skill)
print db
This would do: