18
Riddick
6 19 36
1889/ 1945
Last seen 9 months ago
Member for 9 years, 6 months, 9 days
Difficulty Normal
Best reviews / Newest reviews
First-7nat7 1 1
Good solution, but i think it's not category "clear", maybe, "creative"... More
reverse sort with lambda to return list comprehension with limit-ezebw2 1
Will be more readable if you use slices for this solution. More
All the Same-Ferril 1
Good solution, but I think you may improve this. Firstly, you check list is non-empty if empty you will return True. Secondly, you check if non-empty length list equal 1. Probably, will be good something like this: return len(set(elements)) < 2 More
ABC <= TXT-Ilis 1
nice solution. It will be nice to use `string.ascii_uppercase` instead `ABCD...`. It will be more robust code. More
O(N) - without .count-nakanohito_piyo 1 1
I think this solution should be in uncategorized solutions. Firstly, you may use from collections import defaultdict that create dict with all data count And secondly, you approach looks like O(n*log(n)) but in general in this category for this issue - O(n) More
First-tvylormvde 1
Not bad, you can do this solution in one line of code. More
First-cle99y 1 1
Good, but you used many variables. You could just use the function without assigning More
First-Leonid_Tarasov_PL_Mmf 1
Good solution, but I think better to solve like this: def checkio(arr): return sum(arr[::2]) * arr[-1] if arr else 0 This decision is shorter and slightly more understandable :) More
First-Rufuz
Sorry, but I don't understand about this code: l=len(w) if len(w)>=3 else 0 Can you tell me please - why is this necessary here? It's look like overhead. Thanks More
Second-Rufuz
Solution isn't bad, but did you hear about `set` ? Your solution not effective with big data string. Try resolve it with `set`. Thanks More
First-dxdx111
You can use new style f-string like f'My name is {name} and I'm {age}' instead of format. More
max-r.nov.07.b.b 1
Looks good for clear solution, but non-effective around big-O. Looks like O(n**2) for this solution. More
First-soloshowing
if line == '': You may use for true statement: if line: and for false statement: if not line: So if all summarize, you may start you solution, e.g. if line: some code when you some number return something > 0 return 0 More
First-ttfkoga
if len(line) == 0: max_count = 0 elif len(line) == 1: max_count = 1 Maybe, it will be better if you change to: if len(line) in [0, 1]: return len(line) or you may write something like this: if len(line) in range(2): return len(line) More
Like counting sheep-HeNeArKr 1
You may use in one line: text_list = text.lower().split() More
Simple and One loop-belary 1
I think it will be better if you use in condition: if not line: return 0 or will be the best if line: some code which return > 0 return > 0 return 0 More
Solutions for "All the Same"-An.S.
For more readable you might write something like this: flag = True if elements: some your code return flag More
First-crazyc
You may use in this case smth like this: return max(args) - min(args) if args else 0 More
First-sculylr
1. You may use builtin functions: **max()** and **min()** 2. Sometimes if you use only one **if** without else it will look more readeable if args: TODO something return your_code return 0 3. List comprehension is a very good tool. But in this case I think it doesn't ne More
First-CosimoOne
I think this solution you can move to creative category. More
1
2