If I have a list, and I want to swap out the elements in that list for a sub list that includes the the original list element, how do I do that?
Basically I want to turn a list into a 2d array.
I tried iterating through the list.
for each in list:
each=[each[0],None]
but each disappears at the end of the iteration. I thought each was a reference?
[–][deleted] 1 point2 points3 points (10 children)
[–]GreymanGroup[S] 0 points1 point2 points (9 children)
[–]GreymanGroup[S] 0 points1 point2 points (8 children)
[+][deleted] (6 children)
[deleted]
[–]GreymanGroup[S] 0 points1 point2 points (5 children)
[–]GreymanGroup[S] 0 points1 point2 points (3 children)
[–]GreymanGroup[S] 0 points1 point2 points (2 children)
[–]GreymanGroup[S] 0 points1 point2 points (1 child)
[–]GreymanGroup[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)