A junior software developer would be forgiven for being happy when their code works. If that's you, I don't judge you.
However, if you're ready to move to the next level of building software with Python, your code shouldn't just run and pass some tests. It should also be written taking into account the available computing resources and the energy bill.
Every inefficient loop, poorly chosen data structure, or redundant calculation consumes more electricity than necessary. Unlike C, for example, where you must reserve bits of your disk for each new variable you create, Python will consume resources as it sees fit. This makes it extremely beginner friendly, but it also consumes a lot of power if used incorrectly.
Sloppy algorithms are not only bad for code performance. They are also bad for the planet. Software companies like <a target="_blank" class="af oz" href="https://www.geekwire.com/2024/microsofts-carbon-footprint-keeps-growing-as-ai-drives-data-center-expansions/” rel=”noopener ugc nofollow” target=”_blank”>Microsoft is struggling keep their carbon emissions low because of all the energy they consume for ai and other tasks. At the same time, sustainability is a growing concern. Therefore, sustainability-minded programmers are becoming a valuable resource for many companies.