foods = ['Bread', 'Pizza', 'Burger'] for item in foods: if item == 'Pizza': print(f"{item} found..!") break else: print("If for loop ends full properly, then 'else' will be executed, otherwise not,\nSorry sir, food not found")
foods = ['Bread', 'Pizza', 'Burger'] for item in foods: if item == 'Pizza': print(f"{item} found..!") break else: print("If for loop ends full properly, then 'else' will be executed, otherwise not,\nSorry sir, food not found")
0 Comments