Can anybody explain me why am I getting some errors with the following python code? The loop removes two tuple but one still in the list after the loop end. The print at the end is not the result i am expected.
>>> liste=[(1,2),(2,3),(3,1),(1,4),(3,4)]
>>> for couple in liste:
... if int(1) in couple:
... liste.remove(couple)
...
>>> print(liste)
[(2, 3), (1, 4), (3, 4)]