Loop, a statement iterates over the members of a sequence in order, executing the block each time. There are two types of loop in Python, while loop and for
while loop
while True: print(“Welcome to Python Primer for Data Science”) |
for loop
lead_instructor_list = [“Dr.Lau”, “Reuben”, “Edmund”] for instructor in lead_instructor_list: print(instructor) |