Sorting out numbers from a miscellaneous list of items

 

ml = [34, "abdur", 55, 5, "lala", 78, "jamil", 53, 3, 99,"Ruhee", 66, 45, 12, 1, 2]
for item in ml:
    if str(item).isnumeric() and item > 6:
        print(item)





Comments

Popular posts from this blog

Quotation marks to wrap an element in HTML

What is the difference between iostream and iostream.h in cpp?

The Basic Structure of a Full-Stack Web App