Geek Culture
Published in

Geek Culture

11 Pythonic Ways to Optimise your Code

Good practice that might also lead to good performance.

Photo by Saffu on Unsplash

When optimising Python code, it is generally best to concentrate your efforts on identifying the true bottlenecks in your code and speeding those areas up.

But are is one exception. Certain coding techniques fall under the category of good practice and might also speed up your code. You should do these things anyway…




A new tech publication by Start it up (

Recommended from Medium

Jdbc Interpreter on Zeppelin Tutorial

Python Code for Facial Recognition and Security Automation.

We Migrated From AWS Lambda to ECS, but Hope to Eventually Migrate Back

AWS Lambda vs ECS

CS373 Fall 2021: Week of Oct. 25

Windows Insider Build 20161 Brings Redesigned Start Menu & More!

How to run Cosmos Gaming Hub node (nibiru-3000 chain) and configure Cosmovisor

Unit Test and Continuous Integration (using CircleCI and SQLite(InMemory) Database)

The Worst and Most Entertaining Sorting Algorithms

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
Martin McBride

Martin McBride

Software developer. Java, Python, C++ etc. I write for and maintain the generativepy library.

More from Medium

Python type hints: Just Do It

8 small changes to optimise your Python code

Answers (Part 1) — 7 Difficult Python Test Questions Many Couldn’t Solve In Time

Write better Python code with these 5 CLEAN code Tips.