All the Python tutorials โคต๏ธ
-
Python File Operations
Stop guessing where your files are saved. I use os.getcwd() to find the right path and avoid those annoying file not found errors in Python.
-
Python Set and Frozenset
I cleared up the confusion between empty dicts and sets in Python. You get the right syntax for creating mutable and immutable collections without duplicates.
-
Python dictionary and dictionary methods
I compared a messy if/elif chain against a Python dictionary to show why key-value pairs make lookups simpler.
-
Python tuple and tuple methods
A quick reference on python tuple syntax, the single-element gotcha, and the limited methods available for immutable data structures.
-
Python list and list methods
I explain Python list indexing and slicing with simple examples. You get clear answers on accessing nested data and selecting ranges without guessing.
-
Python loops
I walk through Python loops step by step, covering while and for statements, plus break and continue.
-
Python get input from user
Python input() returns strings, so adding numbers concatenates them instead of summing. I show how to fix this with int() and handle user input correctly.
-
Python comment line
I explain Python comment line syntax, including how to handle multi-line notes, so your code stays readable for future you and other devs.
-
Python print function
I break down Python's print function and why single, double, and triple quotes exist. See how they handle quotes inside strings without breaking your code.