this post was submitted on 15 Dec 2024
113 points (99.1% liked)

Wikipedia

1679 readers
250 users here now

A place to share interesting articles from Wikipedia.

Rules:

Recommended:

founded 2 years ago
MODERATORS
 

For all your list needs.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] h4x0r@lemmy.dbzer0.com 17 points 1 week ago (1 children)

[[[[]], [[]]], [[[]], [[]]]]

Python 3.12.7 (main, Oct  1 2024, 00:00:00) [GCC 14.2.1 20240912 (Red Hat 14.2.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> l = []
>>> l[:] = [l] * 10
>>> l
[[...], [...], [...], [...], [...], [...], [...], [...], [...], [...]]