DEV Community

s
s

Posted on

3

Answer:

Although almost every possible way has been listed in (at least one of) the existing answers (e.g. Python 3.4 specific stuff was added), I'll try to group everything together.

Note: every piece of Python standard library code that I'm going to post, belongs to version 3.5.3.

Problem statement

</p>
Enter fullscreen mode Exit fullscreen mode





This is precisely what I hate about python.

They reduce 2 loc with a nk loc lib that you have to import , which does the same thing " under the hood" as those 2 loc , you don't have to write now. Bulk doesn't lead to elegance of logic. Yes it lets you prototype without seeing how and it may be a commercial strength, but is that always a good thing?

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay