22
narimiran
7 24 41
2882/ 2945
Last seen 5 years ago
Member for 8 years, 4 months
Difficulty Normal
Would like to receive comments/critics of my published solutions.

Best reviews / Newest reviews
First-klaganowski
Last three lines could be replaced with just: return abs(days) More
First-miodrag.novakovic1
You could/should replace lines 4 to 7 with: return sorted(first_word) == sorted(second_word) More
First-karolk10
Instead of the function `o`, you could/should have used built-in function `round` - it would have saved you some trouble. More
First-Freezedr
In the function `is_triangle`, instead of three ifs for different cases, it might be better to sort the values and just compare two smallest with the largest one, for example: def is_triangle(a, b, c): a, b, c = sorted(a, b, c) return a + b > c More
First-ahsan-iqbal
You might want to explore Python's method `count` that you can use on the lists. It might have saved you a lot of trouble here. More
First-anu.arora02012
You might want to explore Python's method `count` that you can use on the lists. It might have saved you a lot of trouble here. Also, there's no need for your line 20 - you could/should just `return my_list`. More
First-anton.minka
There's no need for line 14 - you should just `return data_tmp` More
one liner-chilllaxer
Instead of: list(.....) you could do: [.....] More
First-yalikejazz
Is there a need for lines 2-4? Python knows that x**0 == 1 ;) More
First-Nick__Aleksashin
Is there a need for lines 2-4? Python knows that x**0 == 1 ;) More
First-____733
for i in range(len(num)): if num[i]!=0: ans = ans * num[i] More pythonic way of this would be: for n in num: if n != 0: ans *= n More
First-tjsanfo
You should avoid naming your variables as python keywords, in this case - `list`. More
I couldn't figure out the sorted() function-chilllaxer
You might want to check Python's `sorted` function, it has a `key` argument which would have been very useful here. More
the hamming distance-jacek.maciupa
for i in range(len(binN)): if binN[i] != binM[i]: Instead of this, more Pythonic way would have been: for n, m in zip(binN, binM): if n != m: More
First-DmitriyGordon
There's a built-in function `bin` to convert numbers to binary, no need for reinventing the wheel ;) Also: for i, j in enumerate(nb): if j != mb[i]: you might want to use `zip` in the future: for n, m in zip(nb, mb): if n != m: More
First-Stanislaw_Szataniak
There's a built-in function `bin` to convert numbers to binary, no need for reinventing the wheel ;) More
First-helga2work 1
You can directly pass the `abs` function, without a need for lambda, just: `key=abs` :) More
First-thainok 1
Is `first_list` really needed here? ;) More
Sorted by loving lambdas-8t-one 1
You can directly pass the `abs` function, without a need for loving lambda, just: `key=abs` :) More
City's Happiness-narimiran
The solution would be more elegant if we were allowed to return only one of the most critical points: return min(users.keys(), key=subnetworks) More
1 2 3 4 5 6
7
8 9 10