Geek Culture
Published in

Geek Culture

Python: How fast are Dicts vs Lists?

So, you have a list of objects with IDs, and you need to find an object by its id. How do you keep your objects? In a list or in a dict?

Though this is obvious for experienced developers, it may not be so clear why dicts perform better.

This is another experiment for those who learn to program in Python.

--

--

--

A new tech publication by Start it up (https://medium.com/swlh).

Recommended from Medium

Disable Jekyll’s default syntax highlighter Rouge

Managing costs on Amazon Web Services

Physics, Collisions, and Script Communication

How to Prepare For a Technical Interview

Tips on Getting Started with RAK Commercial Gateway LoRa Server

Ushering in a New Era of Transparency with Covalent!

Linux Privilege Escalation Resources

Igt Slot Machine Software

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
Timur Bakibayev

Timur Bakibayev

Professor, Ph.D. in CS, Almaty Management University

More from Medium

Up Your Coding in Python Using Lists

How to Use Python getattr() Method

Property decorator is another attribute that never exist within the class definition

Memory Management in Python: Garbage Collector