Hey i was wondering if anyone knew how to create a list of 10 lists of increasing length. The first list should be empty, i.e., len(mylist[0]) == 0; the second list should have one element, so len(mylist[1]) == 1; and so on. I have been trying to use extend,append and insert but to no avail
So far i have been able to create 10 lists with no elements
def mylists(x):
d = [[] for x in range(0,x)]
return d
print (mylists(10)
Any help would be greatly appreciated!