Tuples are technically just immutable lists, but by convention we tend to use tuples and lists for quite different purposes.| www.pythonmorsels.com
In Python we care about the behavior of an object more than the type of an object. We say, "if it looks like a duck and walks like a duck, it's a duck." This idea is called duck typing.| www.pythonmorsels.com
An explanation of all of Python's 100+ dunder methods and 50+ dunder attributes, including a summary of each one.| www.pythonmorsels.com
The range function can be used for counting upward, countdown downward, or performing an operation a number of times.| www.pythonmorsels.com
Need to loop over two (or more) iterables at the same time? Don't use range. Don't use enumerate. Use the built-in zip function. As you loop over zip you'll get the n-th item from each iterable.| www.pythonmorsels.com
In Python, slicing looks like indexing with colons (:). You can slice a list (or any sequence) to get the first few items, the last few items, or all items in reverse.| www.pythonmorsels.com
Any reversible iterable can be reversed using the built-in reversed function whereas Python's slicing syntax only works on sequences.| www.pythonmorsels.com
Python's built-in functions list includes 71 functions now! Which built-in functions are worth knowing about? And which functions should you learn later?| www.pythonmorsels.com
Unlike traditional C-style for loops, Python's for loops don't have indexes. It's considered a best practice to avoid reaching for indexes unless you really need them.| www.pythonmorsels.com