256 Python Things I Wish I Knew Earlier
Hard-earned lessons from 500,000+ lines of code over 9 years
I wrote a book: https://payhip.com/b/xpRco
Who this book is for
Beginner or intermediate level Python learners who want to learn useful new things about Python
What you stand to gain from reading this book
I’m confident that you’ll learn at least 100 new things about Python that you’ve not known before (unless you’re already a Python expert)
Who am I?
I’m a software engineer with 4 years of working experience in Singapore, and am currently working at Meta as an automation/backend engineer.
Outside my work, I write on Medium. 95% of my articles are Python technical guides, or related to new things I’ve learnt about Python, despite having worked with Python since 2017.
Why am I qualified to write this book?
Used Python extensively in Meta (Sep 2024 — present) as an automation/backend engineer, building a multitude of process-automation workflows and APIs.
Used Python extensively in Morgan Stanley (Sep 2022 — Aug 2024) as a backend engineer, building and migration lots of APIs using Python, Flask and FastAPI.
Python writer on Medium with 850+ articles, 100K followers, and 2+ millions reads
Wrote multiple PyPI libraries (think external Python libraries for the public to use) with 85K+ downloads in total
Wrote multiple other books in Python well-received with 100+ sales
Grade of A+ for most Python-related modules in university (bachelor’s and master’s)
Python tutor with 1000+ hours of teaching students of various levels (kid to master’s students)
How did you arrive at 500,000 lines of code in total?
Sources of Python code:
my full-time job
non-committed automation scripts at my full-time job
850+ Medium articles, most of which contains Python code
9 published books on Python (some are free at zlliu.co/ebooks)
280 solved questions on Leetcode (not as much as some of you crazies probably)
13 published PyPI packages
many many late nights spent coding in my bachelor’s degree
even more late nights spent coding in my (ongoing) master’s degree
multiple random automation scripts to help with my dad’s businesses
multiple random automation scripts to help myself with day-to-day life
1000+ hours spent as a Python tutor
Verdict: I probably write twice as much code as compared to the average
ChatGPT: average of 250,000 lines of code over 9 years
Me: multiply that average by 2, and we get 500,000
Some highlights from this book
3) We can print coloured text in terminal
40) {var=} in f-strings
65) mydict[key] VS mydict.get(key)
81) We can use * and ** to unpack lists/dicts into functions
106) Advanced customizable decorators
111) Frozensets and why we use them
173) Why from X import * is bad practice
190) breakpoint() and the Python Debugger (pdb)
210) python -i myscript.py, the -i flag, and running code in interactive mode
233) async def, Asynchronous functions, await & coroutines
Conclusion
If you’re looking to fast-track your Python skills to the moon, I’m certain that this book can be your catalyst.
Link: https://payhip.com/b/xpRco
Thank you all for the support I’ve gotten thus far, and I really appreciate it.
Cheers