9. Ways to iterate

System Message: ERROR/3 (/home/runner/work/PyZombis/PyZombis/_sources/lectures/TWP40/TWP40_9_en.rst, line 8)

Duplicate ID – see lectures/TWP18/TWP18_3_en, line 11

.. activecode:: python
    :nocodelens:
    :stdin:

    print(list(range(10)))

    for k in range(10):
        print(k, end=" ")

    for k in [0, 1, 2, 3]:
        print(k, end=" ")

    for k in "avocado":
        print(k + k, end=" ")
You have attempted of activities on this page