Rectangle(color="pink")

# Set up lists
strings = ["lollipop", "unicorn", "rainbow"]
y_positions = [30, 50, 70]
loopList = range(len(strings))  # Explore exactly what is happening here!

# Run animation
for i in loopList:
    with animation(duration=1):
        Text(strings[i], x=50, y=y_positions[i])

For Loop Example 4

by daria

Created 2 years, 3 months ago.
Based on For Loop Example 4 by jamie.