map() vs. List Comprehension
Is the map() function faster than a corresponding list comprehension? That depends! Let's see how using lambda functions can affect the performance of map().
I write about Python, productivity for developers (dotfiles, CLI tools, etc.), micro-entrepreneurship (i.e. side projects that I built), and whatever else interested me at this time.
Is the map() function faster than a corresponding list comprehension? That depends! Let's see how using lambda functions can affect the performance of map().
Running one big blob of code is often faster than splitting your code into well-separated functions. But there are other ways you can improve the speed of your code without sacrificing its readability.
pathlib is an interesting, object-oriented take on the filesystem paths. With plenty of functions to create, delete, move, rename, read, write, find, or split files, pathlib is an excellent replacement for the os module. But is it faster?
Are you an aspiring conference speaker looking to improve your presentation skills? Check out my guide for tips and tricks to help you make great talks that engage your audience.
With four different ways of formatting strings in Python 3.6 and above, it's time to look at which one is the fastest.
What's the best way to compare something to None in Python?
For a tool that probably underlies most of the financial systems in the world, Excel has some incredibly weird limitations and quirks. Let me share a few WTFs I encountered when working with it.
Is using dictionary comprehension faster than calling the dict() function? And what's the most efficient way to create a dictionary from two iterables?
After years of using Evernote, I finally found a worthy replacement. And not only for Evernote but for two other tools as well. Let me show you how I organize my notes, mind maps, tasks, and long-term goals in Obsidian.
Is using {} faster than dict()? If yes, then why? And when would you use one version over the other?
There are plenty of ways to measure the speed of your code. Let me show you a few that I considered for the Writing Faster Python series.
Can we speed up our code examples by simply upgrading the Python version? And if yes, by how much?
Here is a quick tip: if you add a comment to an important command, it will be easier to find it later or understand what it did.
I've got this shiny, new blog design. Let me tell you how I got here. It all started with an idea for a dark theme...
pyenv is a tool that lets you easily install new Python versions and switch between them.