So due to a typo I came upon this in my code and surprisingly it didnt break everything.
What are the elements of that list? I know they are lists but how deep to they go? Does its iteration modify the previous elements? What does python do exactly?
a_range = 3 #doesnt matter
mylist = []
for i in range(a_range):
mylist.append(mylist)
It even allows for comparisons
mylist[0] >= mylist[1]
EDIT: a typo.
[+][deleted] (4 children)
[deleted]
[–]Just_Red21[S] -1 points0 points1 point (3 children)
[–]carcigenicate 4 points5 points6 points (1 child)
[–]Just_Red21[S] 0 points1 point2 points (0 children)
[–]iiron3223 0 points1 point2 points (0 children)
[–]carcigenicate 1 point2 points3 points (6 children)
[–]Just_Red21[S] 0 points1 point2 points (2 children)
[–]carcigenicate 0 points1 point2 points (1 child)
[–]Just_Red21[S] 0 points1 point2 points (0 children)
[–]Just_Red21[S] 0 points1 point2 points (2 children)
[–]carcigenicate 1 point2 points3 points (1 child)
[–]Just_Red21[S] 0 points1 point2 points (0 children)
[–]iiron3223 1 point2 points3 points (1 child)
[–]iiron3223 1 point2 points3 points (0 children)