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
House_password-Dayo
Hi, this is reinventing the wheel. Look at _str.islower()_, _str.isupper()_, _str.isdigit()_. More
generator expr. and join-Peter.White 1
Hi, why generator expression? When you first join, then you can use _str.replace()_. More
First-Qandak
Hi, you can avoid the else if :) return len(array) and return array[-1]*sum(array[::2]) More
First-Qandak
Hi, you don't need to sort the words => _sorted()_ is redundant. You can use a more functional approach: return sum(x in text.lower() for x in words) More
First-Qandak
Hi, you can unpack the _date1_ and _date2_ tuples with *. d1 = date(*date1) d2 = date(*date2) More
First-Qandak 1
Hi, lambda is redundant, key=abs is enough. More
First-leifive
Hi, if...else is redundant: return len(set(filter(str.isalpha, text.lower()))) == 26 More
First-AlexanderPavlichuk 1
Hi, what's wrong with []? E. g. data[count/2 - 1]. More
First-shipulinda
Hi, do not reinvent the wheel: Look at _str.join()_. More
I spend way too much time on this...-Ceph3 1
... two thumbs, but those [] on line 59 are redundant :) More
regex and sets-SubramanyamS
Hi, on line 8, 9 the right-hand sides differs in one number. E. g.: even, odd = ({c for i,c in enumerate(word.upper()) if i%2==x} for x in (0, 1)) More
First-miralin 1
Hi, ','.join() _aka_ str.join() which return __str__ so '%s' % is redundant. More
A sort-of functional approach-matyas.kuti
Hi, its a bit "agyonfunkcionalt" :): 1. All the lambdas are redundant as in a) Python functions are first class citizens and b) you can use the methods of built-in types directly. 2. In this case any_with_pred is also redundant. def checkio(data): predicates = [str.isdigit, str.islowe More
First-py_code 1
Hi [] are redundant. You can write: return sum(c in txt.lower() for c in words) More
First-py_code 1
Hi, the () around ','.join(phrases) are redundant. More
using recursion-gtuk
Hi, this is not pythonic. Look at _str.join()_ method. More
First-cool_cool
Hi, `num` and `val` are redundant: return array[n] ** n More
First-cool_cool
Hi, `list1` and `str1` are redundant: return ''.join(re.findall('[A-Z]*', text)) More
First-mecatxis
Hi, 1. `&` means [_set intersection_](https://docs.python.org/3.4/library/stdtypes.html#set.intersection) in Python. Use `and` instead. 2. You could move line 10 inside the for loop and return the condition: return number and lower and upper More
First-anonymorf
Hi `x` is redundant: return "".join(findall('[A-Z]', text)) P. S.: You can solve it without using __re__. More