57
veky
22 48 64 Leader of the month
44676/ 53887
Last seen 14 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
Cipher Map inefficient solution by a new programmer-taylormyer 1
I don't like CamelCase. Luckily Python has a style guide. :-P A much more important question: why does a new programmer use Python 2? More
Fun with sets-carel.anthonissen 1
Ok, let's say you didn't know how to generate sets in less than 15 lines. But should I seriously believe that you thought it's better to compare sets with [XNOR](https://en.wikipedia.org/wiki/XNOR_gate) than with simple `==`? :-P More
Second - Efficient fun with sets :P-carel.anthonissen 1
Ok, this looks better. But can be improved a lot. First, you don't need so many parentheses. Last line, return doesn't need them: return tally(first_word) == tally(secod_word) Second, not only lists can be comprehended: sets can, too. return {(letter, word.count(letter)) for letter in wo More
First - One liner-carel.anthonissen 1
It's funny that without parentheses around if/else expression it would be more natural and more readable. :-) Also, 0 before : and len() around array can be dropped. More
First - My old friend Dijkstra-carel.anthonissen 1
That 999 is so ugly and error-prone. Why not from math import inf ? :-) More
Stacks on Stacks on Stacks on Stacks-JaredGillespie
Nothing bad would happen if you popped it (after making sure stack is nonempty, BTW `if not stack` is much easier) before returning False: if open[c] != stack.pop(): return False Also, whenever you have `.index` inside `[]`, you should probably use a dictionary instead of parallel sequ More
Dynamic-JaredGillespie
Having a separate function means you should name your things, not index them. def convert_point(point): ''' Converts points into 4 turns ''' i, j = point return [(i, j), (i, ~j), (~i, ~j), (~i, j)] For looping too: for i, j in points_ordered: yield ciphered_pas More
Iterable Iterables-JaredGillespie
Why check for `__iter__` and do something different? It's not what builtin does: > min(3) TypeError: 'int' object is not iterable More
First-JaredGillespie
''.join('I love Python!') would work just fine. :-) More
Maths-JaredGillespie
Nope, that's not maths. :-P (C is wrong.) More
Fibbin-JaredGillespie
It's weird that `is_fib` always starts from the beginning... writing it with a generator would be much nicer. :-) More
Regular Expression-JaredGillespie
Argh, triplicate! :-o word = r'[a-z]+' three_words = ' '.join([word] * 3) found = re.search(three_words, input, re.I) return bool(found) More
ndimage-gyahun_dash
​+3 Very nice usage of scipy.​ More
Secomplex-StefanPochmann
My solution is same as yours but exact (using tuples of integers). :) More
code reuse reuse-StefanPochmann 1
You mean code (reuse reuse)*. :-] More
Use bad eval to prevent a second type transform-grutte_pier
When you're bad, be truly bad. :-] filter('0'.__ne__, str(number)) Of course, much better is filter(int, str(number)) \- not bad at all. ;-) More
Duh-StefanPochmann 1
Try it on a numpy array. :-P Empty excepts are not ok, not even here. :-] More
6handshakes-blankplank
Line 2 is totally pointless. Lines 15-18 are also pointless. Line 12 is just `fhands |= it`. Lines 10 and 11 can be written in the same way. Lines 6, 13 and 14 can be written using `else` loops. More
Generator-veky
Again, obsession with lists. `merged` is the true solution, line 13 is just bureaucracy. :-) More