Actually, I'm not an expert. So I need your help to understand this. 
Expected result :
4
5
5
4
but I got :
4
5
Once I removed the statement : nwlst.remove(i)
I got the expected result.
Can anyone explain this? How this happens?





Code:
lst=[4, 5, 5, 4]
nwlst=lst
for i in lst:
print i
nwlst.remove(i)
Expected result :
4
5
5
4
but I got :
4
5
Once I removed the statement : nwlst.remove(i)
I got the expected result.
Can anyone explain this? How this happens?





