My process with Python involves reading theoretical explanations of concepts, then immediately typing out and running the code myself. Typing out the code builds good muscle memory and is also just generally good practice. If something doesn’t run as expected, I review my code and look for things like syntax errors, logic errors, and data type mismatches.
Sure, I can copy and paste an example from an eBook, website, or other resource and that might be quicker, but for this early stage of my learning process, typing the code myself solidifies the concepts for me. It also helps me focus on syntax and indentation.
I’ve mentioned before that I have direct experience with SQL, which is a query language used for interacting with relational databases. Syntax matters there as well though it’s not as strict. SQL keywords (such as. SELECT, UPDATE, DELETE) will run no matter what case you type them in. It’s good form and best recommended practice to type them in all caps, but functionally, it makes no difference. And with Microsoft SQL (not sure about other systems) even table and column names are case-insensitive.
For example, both of these will run just the same:
SELECT * FROM Customers
WHERE LastName = 'Smith'
select * from customers
where lastname = 'smith'
Python, on the other hand, is case-sensitive. For example, movie and Movie are two different variables here:
movie = "Blade Runner"
Movie = "Blade Runner"
Additionally, SQL doesn’t care, functionally speaking, about indentation. Again, like the use of case, it is good form and best recommended practice to use indentation, but the difference is that with SQL formatting, the benefit is strictly for the humans reading the SQL statements/scripts. When you are looking at hundreds (or thousands) of lines of code and trying to follow the logic of what it is doing, proper formatting makes that a LOT easier than if it’s written as all one jumbled mess. But it will still run whether you adhere to standards for case and indentation or not.
Python doesn’t work that way. You can’t be sloppy. Case matters and indentation matters. Which actually appeals to my sensibilities. I’m one of those SQL people that will groan when I see a lazy mess. I try to write my scripts in good form. Yes, there are online formatting tools where you can paste in your SQL (or other language) and it will be converted to proper format, but that is an extra step someone has to do coming after you where you could have just written it correctly to begin with. I find it also helps to organize my thoughts around what the query is supposed to do.
Having a background in SQL has been beneficial, yet working with a general purpose programming language like Python, even at this early stage, has definitely made me understand the WHY of the indentation logic better. For instance, defining code blocks (which are groups of statements that execute together, like inside functions, loops, or conditionals).
Yesterday’s lesson had me (ahem) looping back to loops. I’ve looked at loops before, but here I explored a few other scenarios, following directly Chapter 3 of Automate the Boring Stuff with Python.
I’ve added my own comments to the code (the green bits after the hash marks). This helps me to remember the logic or even pose questions to track the answers down for when I review it again later.
2025-07-20
Focus Areas: Python.
Key Milestones:
- Learned more about conditional statements (‘if’) and loop control statements (‘while’, ‘continue’, ‘break’)
- Infinite loops (how to avoid and how to escape in a terminal).
- Examined several purposes for empty strings.
Automate the Boring Stuff with Python: Chapter 3 – Loops:
Example 1 – simple ‘if’ and ‘while’ statements

Example 2 – an infinite loop

Example 3 – a ‘while’ statement with an empty string variable

Example 4 – a ‘break’ statement

Example 5 – a ‘continue’ and a ‘break’

Next up – taking a closer look at Functions.

Leave a Reply
You must be logged in to post a comment.