I have this below code written to remove numbers greater than 5 from the list. But it does not work though the code looks fine to me. I'm new to python and trying to get my basics right. I decided to use remove since i'm checking based on the value
a = [1,5,4,6,3,8,9,5,9]
for i in a:
print (i)
if i<=5:
continue
a.remove(i)
print (a)
Result - [1, 5, 4, 3, 5, 9]