Python f-strings: How to Format Text and Variables Quickly Python f-strings are the fastest and easiest way to join pieces of text with your data. You just put an 'f' before your quotes and drop your …
Python Exception Handling: How to Fix Errors Without Crashing Photo from the web Python exception handling is the only thing standing between your cool app and a messy crash. You have probably seen those scary …
Python Decorators: How to Wrap Code and Add Extra Features Python decorators can change how your functions work without breaking your code. You can use them to add logging, check passwords, or time how fast y…
Python Tuples: How to Store Unchangeable Data Cleanly Python tuples store a group of items that you do not want anyone to change by mistake. You write them with simple round brackets, separated by commas…
Python Modules: How to Import and Reuse Code Photo: Wikimedia Commons Python modules let you save your code in separate files and use it anywhere you want. If you find yourself copying the same…
Python Classes: How to Build Your Own Objects Photo from the web Python classes allow you to create your own types of data instead of just using what comes in the box. Think of a class as a blue…
Python While Loops: How to Run Code Until a Condition Changes Photo: Wikimedia Commons Python while loops keep your code running as long as a specific thing remains true. You might use one to keep a game active…