I have the following code:
s = [1,2,3]
t = reversed(s)
for i in t:
print(i)
# output: 3,2,1
If I pop one element from s (original), then the t (reversed) is emptied:
s = [1,2,3]
t = reversed(s)
s.pop()
for i in t:
print(i)
# expected output: 2, 1
# actual output (nothing):
Why does this happen?