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


How to Build & Test Your Unity Game

How to Easily Host a Website for Free Using Netlify

Are All Developers Graduates? Are They In Big Size Companies? Let The Data Talk.

Serve an image using CloudFront and S3 using the AWS CLI on your local terminal.

Sustainable Pace in Product Management

Save Time Using Manop to Print Only Selected Content From the Man Page

Image by the author using Teffects 3d.

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

8 small changes to optimise your Python code

5 Tricks That Will Help You Write Cleaner Python Code

Python type hints: Just Do It

Top 5 Python Blogs that you should follow and read in 2022