> For the complete documentation index, see [llms.txt](https://calnotes.gitbook.io/cs61a-guidebook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://calnotes.gitbook.io/cs61a-guidebook/building-blocks/control-flow.md).

# Control Flow

To understand everything that 61A is trying to teach you, it's important to understand the fundamental idea that everything is based on — **how are Python programs executed?**

Let's start by talking about control flow. The flow of control is the order in which statements are executed by a programming language. For the purposes of this class, let's establish a core assumption: **only one line of Python code can be executed at any given time.**

With this assumption in mind, let us analyze the different ways in which we can mess around with the flow of control in Python.
