Mike Driscoll

@driscollis
412 Followers
13 Following
1.4K Posts

I write, blog, podcast and more about everything #Python

Writing about Python at https://blog.pythonlibrary.org/ and https://pythonpapers.com/

Teaching at https://teachmepython.com/

Podcasting at https://pythonshow.com/

Author of multiple books, including Python 101

Bloghttps://blog.pythonlibrary.org/
Teach Me Pythonhttps://teachmepython.com/
The Python Showhttps://pythonshow.com/
The Python Papershttps://pythonpapers.com/
How to add a legend to a bar chart using #Python and #matplotlib 🐍ðŸ”Ĩ

Did you know you can create your own custom iterators in #Python?

All you need to do is write your own custom `__iter__` and `__next__` methods

Here's an example:

Python Pop Quiz - Number Explosion - Mouse Vs Python

You will sometimes come across examples of code that use one or two asterisks. Depending on how the asterisks are used, they can mean different things to Python. Check your understanding of what a single asterisk means in the following quiz! The Quiz What will be the output if you run this code? numbers = [â€Ķ]

Mouse Vs Python

I have started posting #Python Pop Quizzes in my newsletter and on my blog @mousevspython 🐍❓

These quizzes include the answers too!

#Python lambda craziness 🐍ðŸĪŠ

It's lambdas all the way down!

There are several different ways to create an empty dictionary with #Python

Here are two of them:

How to use #Python and a defaultdict to return a custom message if the key does not exist in the dictionary 🐍🚀
How to create a bar chart with #Python and #matplotlib 🐍📊
Want to grab just the filename from a path in #Python? You can do that too with pathlib! 🐍ðŸ”Ĩ
Artemis II launch: NASA prepares for Wednesday launch of historic space mission

Tuesday, March 31, 2026: Get the latest news and updates on the Artemis II mission as the countdown begins for NASA's return to the moon.

Live Science