the basis is ThinkPython 3rd Edition
We need to work out how these get submitted, maybe the right way is via Github Gists
% python3
Python 3.13.0 (main, Oct 7 2024, 05:02:14) [Clang 16.0.0 (clang-1600.0.26.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
>>>
These notesbook are the chapters of the book, with some modifications to make them work in Google Colab. Google Colab is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud. We should be able to run the code examples in these notebooks. If not, we'll have to quickly figure out a way to make them work.
- Chapter 5: Conditionals and Recursion
- Chapter 6: Return Values
- Chapter 7: Iteration and Search
- Chapter 8: Strings and Regular Expressions
- Chapter 9: Lists
- Chapter 10: Dictionaries
- Chapter 11: Tuples
- Chapter 12: Text Analysis and Generation
- Chapter 13: Files and Databases
- Chapter 14: Classes and Functions
- Chapter 15: Classes and Methods
- Chapter 16: Classes and Objects
- Chapter 17: Inheritance
And we will also be talking in depth about list comprehensions, dictionary comprehensions, set comprehensions, and generator expressions. (because, ProTip: they'll be asked by interviewers)