I have tried to practice python programming after a few months. one of my practice was to write a program which analyse a list and detect two digit numbers and then delete all of them from the list and eventually print the list. when I run the above code, it delete the two digit numbers each other number. here is the link of my screenshot ==> enter image description here
here is the code below,
myNo = [5, 10, 13, 40, 32, 14, 98, 201, 11]
for x in myNo:
if x > 9 and x < 100:
print("Detected numbers are", x)
myNo.remove(x)
print(myNo)
when I delete myNo.remove(x) line, the program will detect all of the two digits numbers correctly but the main part of the program is to delete them. I would really appreciate if someone help me to find my problem. thanks