Programming
Programming tutorials for people who want code that actually runs, not code that only looks right. Pick a language, start at the beginning, and don't skip the basics. They are where most problems come from.
Reproduce an interpreter mismatch, compare executable, pip and module paths, then verify the repair from the Python environment that runs the application.
Validate a defined spreadsheet-export contract, record rejected rows with reasons and line ranges, and reconcile accepted and rejected outputs without changing the source.
A dictionary comprehension builds a dictionary in one line. Good for transforming, filtering and building lookups. Bad for nested logic, side effects and anything that needs error handling. Shorter code is not always better code.
If a class mostly holds data, @dataclass writes __init__, a readable printout and equality for you. Use field(default_factory=list) for lists, __post_init__ for checks and frozen=True for values that must not change.
ModuleNotFoundError has a handful of causes: the wrong Python, an inactive virtual environment, the wrong folder, or a file that shadows a module. Check them in order instead of reinstalling.
Importing a file runs it. if __name__ == "__main__" keeps a file's script part from running when another file imports it. Use it with a main() function, and know the cases where you don't need it.
print() is for the output a person asked for. logging is for messages about the program: levels you can turn down, a file with times, and tracebacks for errors. Set it up once in main() and use a logger per module.
glob() searches one folder, rglob() searches every folder below it. Neither sorts the results, skips folders like .venv, or matches .CSV on Linux. Add those yourself, and always do a dry run before deleting anything.
pip freeze gives exact versions but hides what you chose. A hand-written file shows what you chose but isn't exact. For anything you deploy, keep both: one file for intent, one frozen for exact versions.
Separate zero collected tests from an import failure, install into the correct environment, and prove the selected test catches a broken assertion.
for line in file reads one line at a time, so a 10 GB file uses almost no memory. read() and readlines() load everything. Count, filter and stop early without building a list, and read in blocks when there are no lines.
Getters compute a value when you read it, so totals never go stale. Setters check a value when you assign it, so a negative price throws instead of saving. With private fields, nobody can go around them.