DEV Community

Kevin Lubick
Kevin Lubick

Posted on

Animated Python: For Each Loops and Palindromes

Loops are one of the trickiest concepts for beginning programmers.

To help, I've started a series of animations that walk through how Python code executes for loops (and conditionals, variables, and functions).

The first animation features code that detects palindromes, a sample of which is available below.

Preview of Animated Python Example

The full animation, along with some commentary explaining the various steps, is available for free on YouTube [8 minute watch].

The animation was created using Manim, which allowed me to write Python code to explain Python code. I find that amusing (and also very helpful).

Top comments (0)