57
veky
22 48 64 Leader of the month
44587/ 53887
Last seen 1 hour ago
Member for 11 years, 6 months, 7 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
A little weird :)-hrvoje
Please don't use "concatenating digits in a large base" as a method for selecting by multiple keys. Unicode has more than 1e5 code points (if not now, then soon:)). Tuples comparison is exactly meant for this. Key should be (count, -ord). Also, this algorithm has quadratic complexity, while the t More
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
First-sodium
Lines 12-14 can be simply written as f = kwargs.get('key', lambda x: x) Also, None can be aliased. :-) val = fval = None More
First-MatthiasWiesmann
"return None" is the same as "don't return anything". You don't need lines 5 and 12. More
First-Mycroft0121
aargh. My eyes hurt. What good can you _possibly_ think will come out of a line as if b != int and b != str and b != list and b != float and b !=bool: And lines 5-11 are really mind-bending. Is this some kind of bet? How to convert iterable to list in the most complicated way imaginabl More
Mycroft's-Mycroft0121
Lines 2-4: you can set a = b = c = 0 And in line 15, you can just say return a and b and c and len(data) >= 10 More
First-Mycroft0121
base is not necessarily named parameter. :-) More
First-Mycroft0121
c.extend([x]) is much clearer as c.append(x). And whole business is just a list comprehension, but you don't need to know about that yet. :-) More
First-Mycroft0121
First, why a special case that is not special at all (lines 2-4)?? Second, why are you str-ifying i and j? More
First-Mycroft0121
Nice solution, but "i" is really a strange name for a product. :-) More
First-Mycroft0121
sequences are boolable. You can just write "if not args" in line 2 (or even "if args" if you switch lines 3 and 5). More
First-Mycroft0121
That "sum" being red wasn't enough of a hint for you? :-) Yes, there is a sum builtin. It might come handy. ;-) Also, you might learn about slices and negative indices. More
First-Mycroft0121
See a pattern? :-) BTW, that "else" is really misplaced. ;-P More
First-Mycroft0121
6 times... have you considered writing a function? :-] More
First-Mycroft0121
Again, you might see (and exploit) a pattern in the above code. At least in lines 10-17. :-) More