Photo by Joshua Hoehne on Unsplash

The dictionary is one of the language’s most powerful data types. In other programming languages and computer science in general, dictionaries are also known as associative arrays. They allow you to associate one or more keys to values.

In this article, I’ll share some ‘beyond the basics’ tips and tricks…

Illustration by author

Here are eight neat Python tricks some I’m sure you haven’t seen before. Apply these tricks in your Python code to make it more concise and performant!

1. Sorting Objects by Multiple Keys

Suppose we want to sort the following list of dictionaries:

people = [
{ 'name': 'John', "age": 64 },
{ 'name': 'Janet', "age": 34 },
{…

Photo by Lucas van Oort on Unsplash

More often than not, software projects are difficult to build from source. This can have multiple reasons, here are just a few:

  • The project requires lots of dependencies.
  • The project requires outdated libraries. Once you install those, other projects might break in turn.
  • You’re running Windows or a Mac, but…

Erik van Baaren

Software developer by day, writer at night. Owner of https://python.land. Subscribe to Medium to read all my articles and those of other writers.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store