Incredibly surprising python programming

Someone show me that code today
def get_bool():
    ar = []
    return list(sorted(ar))

WOW :)

Ofcouse he told me that this was joke ;)

String comparison speed
It looks like strings comparison have no influence to dict operations. I've measured how dict insertion time depends from size of string keys.
This code...Collapse )
generates random results. Maybe my calculations is wrong?

The Beginning
I've founded this community because there are too few things on the Internet, which are both funny and useful for me, as a python programmer.
So, like I usually do as a programmer, I decided to create my own place where people can say "Hey, check this out. I've made something incredible" or "Guys, you can't even imagine how hard it is to make ... in python". You can also ask some special questions there.

Well, about the rules. Of course, like all communities (I mean good ones) this one will have its own.

Rule #1. Everything you post in there must be interesting or funny. And It has to concern python or at least programing in general. So, please, no off topics there, or I'll delete your post and maybe even ban you for writing.
Rule #2. You have to post in English. It is supposed to be an international community.
Rule #3. Any lexical forms allowed, if they have any sence of course. If your emotions call to rough language, there's no limits for you there.

Enjoy it!

Best regards. Ev_genus.


Log in