Theo@lemmy.world to Wikipedia@lemmy.worldEnglish · 7 days agoList of lists of lists - Wikipediaen.m.wikipedia.orgexternal-linkmessage-square9fedilinkarrow-up1114arrow-down11file-text
arrow-up1113arrow-down1external-linkList of lists of lists - Wikipediaen.m.wikipedia.orgTheo@lemmy.world to Wikipedia@lemmy.worldEnglish · 7 days agomessage-square9fedilinkfile-text
minus-squareh4x0r@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up17·6 days ago[[[[]], [[]]], [[[]], [[]]]]
minus-squareSilverchase@sh.itjust.workslinkfedilinkEnglisharrow-up5arrow-down1·6 days agoPython 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 [[...], [...], [...], [...], [...], [...], [...], [...], [...], [...]]
[[[[]], [[]]], [[[]], [[]]]]
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 [[...], [...], [...], [...], [...], [...], [...], [...], [...], [...]]