The purpose of this article is to provide a quick primer on the simulation of a simple physical system from classical mechanics based on the Python programming language. For that, we will be using the pendulum as a well-known example that is treated in many physics textbooks. The article consists of two sections; the first section covers the math behind the swinging pendulum by providing a short derivation of its equation of motion. The second section then addresses the computational part, in which the equation of motion is solved numerically, and the movement of the pendulum is animated using VPython Trinket, a powerful environment for creating 3D animations in Python.