21
hanpari
7 25 46
2435/ 2695
Last seen 11 months ago
Member for 10 years, 6 months, 16 days
Difficulty Normal
Author of Sovereign https://www.royalroad.com/fiction/26615/sovereign My blog https://pavelmorava.com/

Best reviews / Newest reviews
Without if/else-martin_b
I like your solution except for one thing. You are way too talkative fr = c(f, *args, **kwargs) gr = c(g, *args, **kwargs) actually, fr, gr = map(lambda h: c(h, *args, **kwargs), (f,g)) will make you noble and silent man. PS: Just kidding :) Nice one. More
First-tatij
return array**n if n < len(array) else -1 It should work just fine :) More
First-321Robert123
You may find useful *set*. len(set("abcd")) == len("abcd") #{'d', 'a', 'c', 'b'} while len(set("aaaa")) != len("abcd") # {'a'} More
First-Wienands 1
Yeah, what programming language did you come from? Are you sure you need globals? Programming with side effect is generally frowned upon. do_way(first,emptymatrix) ??? What about to pass values you need via return and not to share them via globals? But I like your style :) I would ne More
the generator way-xtofl
Your solution seems to me similar to mine :) I like your using "yield from" it is nice feature. Thanks for reminder. More
First-Eretic
In this case if while too much. You could save some typing using for i in range(len(state)) More
First-tiberiu.lepadatu
You dont need a=[i for i in args] args is already tuple, it should work just fine. Or, if you for some reason insist to have list, you can simply convert a=list(args) There is fine trick in python called unpacking. # len(args) == 3 a,b,c = args It is more readable then us More
First-Slepice1
Nice one, but I wont thumb it up since it is not using frozensets :) More
First-caynan 1
You are trying too hard :) What about simplifying your solution? There is no reason to have def __add_connections(self, connections): for connection in connections: self.add(connection) More
First-ked
Dont use \ to continue line. You can use () instead More
First-admiral_proton
neighbours = -grid[row][col] Thats clever :) More
Only our neighbourhood counts-maurice.makaay 1
for row_offset, col_offset in ( (-1, -1), (-1, 0), (-1, 1), ( 0, -1), ( 0, 1), ( 1, -1), ( 1, 0), ( 1, 1) ) I like that clear style :) It is put nicely. More
First-Slepice1 1
You can make your code more clearer: timel = time.split(":") using this: hours, minutes = time.split(":") More
First-jesaispas
I like your coding style though your solution is pretty complicated :) Good work. More
Simple re-ale1ster 1
Pretty interesting. What is this construction if I may ask? s=__import__('re').sub More
gcx11_library/2-gcx11 1
Instead of if array == (): Use if not array: PEP8 or something ;) More
gcx11_es/5-gcx11 1
It is pretty long :) What about to DRY it and make one universal function for each direction? http://www.zdrojak.cz/clanky/navrhove-principy-dry/ But I like WET principle better :) We Enjoy Typing is sort of cool :) Good work, though. More
First-foota
Is it really that fast to be placed in SPEEDY? I am just curious :) No offense intended. More
Floota-Tobsic
Line 6 is fine idea. I was stupid enough to indicate checked field by extra mark "x". Shame on me :) and thumbs up! More
First try-leopaesen
One point for using itemgetter. The rest could be improved. More
1 2
3
4