40
suic
16 39 57
9964/ 10664
Last seen 4 days ago
Member for 9 years, 10 months, 19 days
Difficulty Advanced
Best reviews / Newest reviews
First-jirka.hrbek 1
Hi, 1. Line 3: `[]` are redundant. 2. Look at `Counter` in `collections` module. More
Best cheat-JanKaifer
Dictionary cheat :) def days_diff(date1, date2): try: return {((1982,4,19),(1982,4,22)): 3, ((2014,8,27), (2014,1,1)): 238, ((1,1,1), (9999,12,31)): 3652058, ((9999,12,31), (1,1,1)): 3652058, ((2 More
First-Leolo
Hi, I've played with your code. [Here](http://www.checkio.org/mission/brackets/publications/suic/python-27/leolos-shortened/) is the result. :) More
First-Kilaruna
Hi, `lambda` is redundant here. _abs()_ is already a function, so you can write: return sorted(numbers_array, key=abs) More
First-Kilaruna
Hi, 1. look at _sum()_ and _generator expressions_. 2. __bool__ is a _subclass_ of __int__. More
First-Djekke 1
Hi you could use _any()_ instead of that `for` loop. More
First-nastyajeid 1
Hi, you don't need that "else cascade" in the end. 1. Instead of `'a' <= x <= 'z'` you can use `x.islower()`. 2. Instead of `'A' <= x <= 'Z'` you can use `x.isupper()`. 3. Instead of `x in b` you can use `x.isdigit()`. 4. Line 14: `if number and u_letter and l_letter:` etc. More
First-jollyca
Hi, I have a few comments: 1. What is the point of using enumerator if you don't use _i_? 2. In fact you do everything twice. More
First-Zophar78
Hi, you could use _sum()_ with _generator expression_ instead of `for` loop and `result` variable. More
First-mohamed.amer.tarak 1
Hi, Python is not C. I'm not sure if this is speedy, have you measured it? More
Second-mohamed.amer.tarak 1
Hi, have a look at _filter()_. More
First-tehtactics19
Hi, this is one of the standard solutions. It's just. On the other hand you could write it as a one-liner, but it's not necessary. :) More
First-Rahul_Badenkal
Hi, 1. Look at _filter()_ and _str.join()_. 2. You could write `b += a` instead of `b = b + a`. 3. Look at _str.isupper()_. More
First-Rahul_Badenkal
Hi, you could write this sum(array[::2]) # instead of: sum(x for x in array[::2]) If `array` is not empty: array[-1] == array[len(array)-1] More
First-Rahul_Badenkal
Hi, look at _min()_ and _max()_ built-ins. Don't redefine them. More
First-Rahul_Badenkal
Hi, 1. On line 2 _str()_ is redundant as _bin()_ returns __str__. 2. Look at _str.count()_. More
First-Rahul_Badenkal
Hi, look at other solutions. This one is quite awkward. You could write: b[0:len(b)-1] == b[:len(b)-1] More
First-Rahul_Badenkal
Hi, look at _sorted()_ and _generator expressions_. More
First-kasuka
Hi, that `map` is redundant: return ",".join(phrases).replace("right", "left") More
First-giorgian
Hi, line 8: `[]` is redundant. More