Does this code create an infinitely deep list?
foo = ['Hello']
bar = [foo]*100
foo[0] = bar
print foo
print foo[0] == foo
print foo == bar
Because that is what it seems like, but how is it not taking up infinite amounts of memory then, everything is still running smoothly. Does it take up less memory because of pointers? Also, if I were to get to the bottom what value would I find? Where has the original 'Hello'
gone in the computer's memory?
Note:
this is not a duplicate, because of the last question.