• Without a loop, a script needs one line for each port:

    print(f"interface {ports[0]}")
    print(f"interface {ports[1]}")
    print(f"interface {ports[2]}")

    A for loop runs the same lines for each item of a list:

    The script ports = ["Gi0/1", "Gi0/2", "Gi0/3"], for port in ports, print(f"interface {port}") prints interface Gi0/1, interface Gi0/2 and interface Gi0/3.

    Figure 1 - The for Loop Runs Once per Item

    The for line ends with : and the lines under it start with four spaces, like with if.

    In the lab, use a loop on the list vlans to print vlan 10, vlan 20 and vlan 30.
    Click Run to get the flag.

    Answer the question below

    Enter the flag you obtained.