Python Snippets
List Comprehensions in Python
Learn how to use Python's list comprehension syntax: an awesome, Pythonic tool for creating new lists from existing iterables.
I'm a freelance developer, mostly working in web development. I also create course content for Teclado!
Python Snippets
Learn how to use Python's list comprehension syntax: an awesome, Pythonic tool for creating new lists from existing iterables.
Learn Python Programming
In this post we continue our journey to create a new sequence type using classes and Python's special methods. This time we focus on operator overloading!
Python Snippets
In this Python snippet post we take a look at the enumerate function: a vital tool for creating Pythonic loops.
Coding Interview Problems
Reversing a list is one of the most commonly asked interview problems. It's asked to test fundamental knowledge and also your problem-solving skills. In this post we look at a couple different ways to reverse a list easily!
Python Snippets
In this post we cover shorthand operators for performing set operations in Python. We'll look at the three most common ones: union, intersection, and difference.
Python Snippets
Python lists have a handy method called reverse, but it's not always what we want. For a start, we can't use it on other sequence types, like tuples and strings, and it also performs an in-place modification of the original sequence. Using slices we can get around these limitations, reversing
Learn Python Programming
In this post we continue our journey to master Python's dunder methods by creating a new sequence type from scratch.
Python Snippets
Get familiar with the different uses for else in Python. It's not just for if statements: we can use it with loops, and for error handling too!
Learn Python Programming
Learn to exploit the power of Python's magic methods by creating a new sequence type from scratch!
Learn Python Programming
In this post we take a deeper dive into Python slices, and pull back the curtain on the magic methods behind the slice notation we covered in earlier posts.
Learn Python Programming
Slices are amazing whenever you want to use a piece of a larger sequence. Learn the basics of slicing in Python and add a powerful tool to your repertoire.
Learn Python Programming
Take a deep dive into Python's rounding functions! Learn about floor, ceil, trunc, and round, and avoid common rounding errors in Python.