how to create a list of lists using list comprehension [closed]

your syntax is slightly off

coordinates=[[x,y,z] for x in range(4) for y in range(4) for z in range(4)]

Browse More Popular Posts

Leave a Comment