• Repeating Code Execution with a Loop

    #!/usr/bin/python3 #------ While Loop count = 1 while count <= 10: # Try "while True:" for infinite loop, on your env print("Love you Python!!") count += 1 #------ For Loop #'For Loop' in python is like foreach loop in other languages my_objects = "file", "directory", "process", "service" for item in my_objects: print(item) # Break and Continue statements my_numbers = range(1,11) for item in my_numbers: print(item) if item == 6: continue print("Whats up Python?") if item == 10: break Ask Vikas
    Just press 'Run'.