Latest articles

How nested comprehensions work in Python

We can nest comprehensions the same way as we can nest for loops. In this article, we explain how it works.

Read more

How to use dict comprehensions in Python

What are dict comprehensions? How do they differ from list comprehensions, and when are they useful.

Read more

How to use set comprehensions in Python

What are set comprehensions? How do they differ from list comprehensions, and when are they useful.

Read more

Why should we use comprehensions in Python?

There are at least three good reasons why we should use comprehensions in Python. Let's see what they are.

Read more

How do list comprehensions work in Python

A detailed explanation of how list comprehensions work in Python. What's their purpose. When to use them and when not to.

Read more

How to delete files and directories in Python

How to delete files and directories in Python using os and shutils modules

Read more

How to get and change the working directory in Python

What is a working directory (CWD), and how to get it and change it in Python?

Read more

Python strings cheat sheet

This reference article covers the most common operations with strings.

Read more

How to read directory content in Python

We look at three ways to read directory content using the built-in os module.

Read more

About bool in Python

True+1+True=3. What bool values really are in Python.

Read more

Join the newsletter

Subscribe to get new articles about Python, code and programming into your inbox!