57
veky
22 48 64 Leader of the month
44668/ 53887
Last seen 12 hours ago
Member for 11 years, 6 months, 24 days
Difficulty Advanced
We shall not cease from exploration, and the end of all our exploring will be to arrive where we started and know the place for the first time.

Best reviews / Newest reviews
Recursive, short, weird but works! :)-hrvoje
Nice and complicated. :-P Wouldn't dict be more appropriate data structure for z? More
Look ma, no regex! :)-hrvoje
First, if you _used_ regex here, that would be remarkable. Not using Python re here is like not using a bicycle for swimming. :-D Second, argh. Please don't do if c: return True else: return False if c binds something bool. Do return c Token count just went from 7 to 2. A More
Total n00b-jkibbe 1
Yep, a lot more code than needed. BTW you get a Special Confusion Award for using " ".join on a str. :-D (And then .split() right after that.:) More
Recursion-drejcek 1
Noone said list won't be empty. :-P More
xor-drejcek 1
A lot of people know about .format _method_, but they don't know about format _function_. It's really much nicer when you just want to format a single value. format(m ^ n, "b") More
sorted-drejcek 1
First, don't test "len(args) == 0". Just test "args" (or "not args", if you want to have that order of returns). PEP8: "For sequences, (strings, lists, tuples), use the fact that empty sequences are false." Second, why sort? min and max are linear. More
Check with for loops and ifs-DiracRules
Different operators can be chained too. if a == b == c != '.': return a More
First-DiracRules
Instead of .keys, try using .items: for i, f in lettersFound.items(): Then you can write f instead of lettersFound[i] every time. More
Plain, simple solution-DiracRules 1
It's ok, but man, that semicolon hurts my eyes. :-P More
Quick 'n' easy-DiracRules
A nice way to complicate a simple task. :-D More
First-DiracRules 1
?? What _did_ you think float(median) does? Changes the type of a live value? :-O That's impossible even in C. ;-P More
First-esatana
You were trying to avoid use of .count, but weren't successful? :-D More
exec statement-SandeepManilal
Worst abuse of list comprehensions I've seen. :-D More
First-SandeepManilal
Aurgh. Please see http://pyvideo.org/video/880/stop-writing-classes More
Using re-SandeepManilal 1
Lines 13-18: there is "or" keyword in Python. Might come handy. :-) count += first<=VOWELS and second<=CONSONANTS or first<=CONSONANTS and second<=VOWELS Also, you don't need .isalpha() at all. More
better possible?-SandeepManilal 1
Those conditions are really mind-bending. You seem like you're trying to find the most complicated way to say something. :-( For example, lines 37-38 are just if "OOO" in game_result + transpose: return "O" range(0,3,2)... wasn't it simpler to write just 0,2 ? And why do you have _two_ More
The birds-SandeepManilal 1
Lines 12-15 are just return min(feed[hour - 1], birds) In fact, you don't even need line 11. More
isalpha-SandeepManilal
LOL. This is getting funnier and funnier. I'd understand if you where some kind of Python newbie, but you know about filter builtin, unbound methods, and collections.Counter. You're obviously not a newbie. Why do you write such convoluted code then?? I really want to know. :-) More
simple roman-SandeepManilal 1
Argh. Again. In one moment, you use OrderedDict. Just one line below, you write that completely unnecessary while. Dr. Jekyll and Mr. Hyde, are you? :-D Also, if you use +=, you can use %= in line 9, too. More
union-find-ciel
There is much easier way to implement UnionFind. Objects don't need to be listed, associative mappings are much more intuitive. ;-) More