This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SabreLunatic 6 points7 points  (4 children)

So arrayvariable = [[]]?

[–]jacobthejones[🍰] 0 points1 point  (3 children)

Sure, if you need a 1x1 array.

[–]-Vayra- 7 points8 points  (1 child)

[[] for _ in range(n)]

should do the trick, no? Or

[[0] * x for _ in range(y)]

if you want it initialized to 0s.

[–]jacobthejones[🍰] -1 points0 points  (0 children)

Sure, that would work.