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

Wikipedia

1681 readers
149 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
[–] silverchase@sh.itjust.works 4 points 1 week ago
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
[[...], [...], [...], [...], [...], [...], [...], [...], [...], [...]]