Compass Mentis - Python Training and Development Blog

Python tip: 1. 2. 3. Enumerate

Say you want to print a numbered list. For instance: Apples Bananas Oranges Pineapple How would you do this? Maybe like this: (The output has a space after each number, which doesn’t look right....

Python tip: Use for loops correctly

If you come from another language, like C, you may write a loop like this: Or perhaps you have discovered Python’s for loop so you use that to make i equal to 0, 1,...

Alphabet on blackboard

Tips for writing better Python code

I was a very experienced programmer when I started using Python. So I wrote some very bad Python code. Each language has its own way of doing things. The more you learn the language,...

Conference workshop

Write your own games, simulations and demonstrations with PyGameCreate interactive graphical applications for serious funA 3 hour workshop, EuroPython 2019, Basel, Switzerland I thoroughly enjoyed being at the 2019 EuroPython conference in Basel. I...