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
First-daphnetingting
* in this case, for key parameter is lambda preferred, * nevertheless, in case you had prepared dedicated function on advance, you should not have diminish your effort by naming it so vaguely as you did. More
First try-leopaesen
One point for using itemgetter. The rest could be improved. More
First-Vlad_Lopato
#data = data.sort(key = data["price"]) It doesnt work this way. You need key=lambda x: x["price"] More
First-sculylr
You could use reverse=True in your sort method to avoid mess in your 7th line. More
First-malavika.dinaker
Never solve programatically something you can solve using mathematically. :) 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
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
Concise-pubbin 1 1
You should not used \ to break code into more lines. Just use () like this: return ("FizzBuzz ... ... ...) It is safer and simpler. More
First-reguy3 1
Instead your: for i in range(len(matrix)): for j in range(len(matrix)): ... you can use product from itertools from itertools import product for i,j in product(range(len(matrix))): ... Hope it helps Subject: [CheckiO] Your random review: Weak Point More
First-traxy
What is this special case? if numbers == [-10,-1,-1,-10]: return -2 Subject: [CheckiO] Your random review: Stair steps:Uncategorized:54466 More
Double-ended queue-bryanandrade
It is a small thing but what about to revert your code like this to make your code clearer? for move in moves: xi, yi = x + move[0], y + move[1] if (xi, yi) == b: return len(path) if all(0 < xi < 9, 0 < yi More
First-RandyWaterhouse
Hi, you solutions is really really wet :) Consider this JUMPING = { (3,8) : (-2,1), (2,7): (-1,2), .... } def jump_targets(field): ... x,y = JUMPING[col, row] targets.append(back_translation[x]+str(y)) r More
First-Tsutomu-KKE
Well done! Subject: [CheckiO] Your random review: Simple hashlib:Uncategorized:53547 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
First-svenhofmann1985
Nice, but of course you might use: return (max(args) - min(args)) if args else 0 Subject: [CheckiO] Your random review: The Most Numbers:Clear:52939 More
First-adrian.wawrzak
Nicely named variables, just few quick hints to shorten your code: you can use: for i, current in enumerate(phrase): and you can write: indexesToSkip += [i+1, i+2] Hope it helps. Subject: [CheckiO] Your random review: Bird Language:Uncategorized:52447 More
First-CatHeist
Just one hint. Try this one: sample = "This is sample Text Sample" result = {char:sample.count(char) for char in sample.lower() if char.isalpha()} or check Counter from collections :) Subject: [CheckiO] Your random review: The Most Wanted More
Solutions for "The greatest common divisor"-linxiaohui 1
What about something like this: def gcd(a,b): a,b = sorted((a,b), reverse = True) return gcd(b, a%b) if a%b else b I hope I made no mistake. No guarantee without running the code :) And of course you should try :) import gcd from fractions Subject: [CheckiO] Your rand More
First-VitGadurek 1 1
Good work. But you dont need to convert your numbers to string in this task. PS: I když já to udělal taky :) More
Two lines & recursive-jrebane 1 1
You should change your category to Creative :) Well, it is overcomplicated. But nice :) More
1
2 3 4