For Loops In Python

Code file as described in the video

# list1 = [ ["Harry", 1], ["Larry", 2],
#           ["Carry", 6], ["Marie", 250]]
# dict1 = dict(list1)
#
# for item in dict1:
#     print(item)
# for item, lollypop in dict1.items():
#     print(item, "and lolly is ", lollypop)
items = [int, float, "HaERRY", 5,3, 3, 22, 21, 64, 23, 233, 23, 6]

for item in items:
    if str(item).isnumeric() and item>=6:
        print(item)



Comments(2)

Manav_Seng at 2019-06-23 09:30:09 says
Name: Manav Sengupta Solution: list = ['Eggs', 'chicken', 5050, 12,56,345,35355] for list in list: if(type(list)==int): print(list) print(147*"*"+"\n*"+145*" "+"*\n*"+9*" "+"Thanks for checking out my code, and a ton of thanks to CodewithHarry Channel for all the Quality Content for Free"+22*" "+"*\n*"+145*" "+"*\n"+147*"*") # Gratitude
Manav_Seng at 2019-06-23 09:30:09 says
Again i did a mistake sorry: Solution: list = ['Eggs', 'chicken', 5050, 12,56,345,35355] for list in list: if(type(list)==int and list>6): print(list) print(147*"*"+"\n*"+145*" "+"*\n*"+9*" "+"Thanks for checking out my code, and a ton of thanks to CodewithHarry Channel for all the Quality Content for Free"+22*" "+"*\n*"+145*" "+"*\n"+147*"*") # Gratitude