Using Python to create a program like below.
If the value in the list is more than 100, the number in the list disappears using the "remove function."
(Example: [37, 66, 88, 111, 245, 33]
-> [37, 66, 88, 33]
)
As you can see from the code that I made at the bottom, Of the values above 100, only one value disappears. It seems that more than one value is not recognized.
lst=[37, 66, 88, 111, 245, 33];
for n in lst:
if n>100:
lst.remove(n)
print(lst)
#[37, 66, 88, 245, 33]
Let me know what I did wrong. Even a small hint is fine. It would be very grateful if you let me know.