Computers dissipate energy when they're running -- period. They do so even if nothing productive is happening. So your argument is only valid for code which takes a long time to execute. And even so, I'm pretty sure that a comparison with the energy consumption caused by billions of people watching braindead YouTube content would reveal that running Python scripts is among the lesser environmental problems we're facing. Context is important.