One of my favorite data structures in Python is the list. Honestly, there's a lot to like about Python lists. For one, they're easy to use and intuitive. In fact, declaring one and indexing it is as easy as:
nums = [2, 9, 6] nums # returns 2
Better yet, Python lists are thoroughly supported. There are tons of convenience features that make lists fun to work with (i.e. negative indexing, iterable unpacking, etc.). That's why I can't stop writing about them:
- How to Write a List Comprehension in Python
- How to Sort a List of Dictionaries in Python
- How to Sort a List of Strings in Python
- How to Get the Last Item of a List in Python
- How to Clone a List in Python
- How to Check if a List is Empty in Python
- How to Convert Two Lists into a Dictionary in Python
- How to Sum Elements of Two Lists in Python
Well, lately, I've decided to start improving these articles to include more than just solutions. For example, a few months ago, I started adding performance metrics using the
timeit library. Recently, I started adding challenges, so you can take what you learn a step further.
Now, I'm converting some of these articles into videos for your viewing pleasure. Say hello to my latest two videos:
As always, I appreciate your support, and I hope these videos are helpful to someone. Thanks!