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…
Python Dictionaries: How to Store Data With Keys Photo from the web Python dictionaries store your data in neat pairs so you can find anything in a split second. Imagine putting labels on sticky no…