31
Cjkjvfnby
10 30 43
5274/ 5695
Andrey Solomatin
Last seen 1 year ago
Member for 11 years, 2 months, 8 days
Difficulty Normal
Best reviews / Newest reviews
First-tobixx
You docstring does not fits python preffered style. More
First-Hanna_Hofman
**You dont need lambda 1**: just call you code in place **You dont need lambda 2** push = stack.appned More
First-frichard44 1
Python have frozenset, it is exacly what you need. Same as set, but hashable and immutable. It is best way in current case, becuase it interacts with other sets. Other solution is to use tuple. It is hashable too. **"%s:%s"** -> **(a, b)**. And sort it just before convertation: tuple(sorted(conne More
First-knagaev 1 2
String are too hot for this just [freeze set](https://docs.python.org/2/library/stdtypes.html#frozenset). Empty string after methods looks ugly. https://docs.python.org/2/tutorial/datastructures.html#sets Similarly to list comprehensions, set comprehensions are also supported: >>> a More
Now I want to play Triominos-maurice.makaay 1
No need braces on line 5 _placements is same as permutation _all_possible_scores return tuple of two args, but second is not used comment in line 23 can be placed in docstring **have_seen_equivalent_for** return True or None generator expression is too huge More
First-jcg
\# in real life use module re This life is quite real :) https://docs.python.org/2/library/stdtypes.html#str.isalpha No need to add branch with nothing. else: # optionnal continue # explicitly do nothing You can use enumerate instead of range. More
First-bukebuer 2 1
You solution is potentialy wrong. In precondition: string.ascii_letters + **string.punctuation** Your **".,;:?!"** is not cover all punctuation You can simplify you code by using None as split separator (https://docs.python.org/2/library/stdtypes.html#str.split) You can zip message and scores. Or More
Homegrown Functional-hharrison
You call key twice on each compare. So you will have issue in certain cases: (key=next) You need only one call per item. flexible_reduce is just proxy for call another function, you can remove it. More
Functional-abesto
If you can import you can use https://docs.python.org/2/library/heapq.html#heapq.nlargest import are prohibited by description "Some builtin functions are closed here: import, ..." You use issue in task checker for your solution. More
Functional (old)-ciel 1 1
oh, so complex you know there is only two items, so map(sub(...)) can be simplified days_diff=lambda *a: abs(operator.sub(*map(datetime.date, *zip(*a))).days) do you know about starmap? from itertools import starmap days_diff=lambda *a: abs(operator.sub(*starmap(datetime.date, a)).da More
Nested cycle-mike269 15 3
You can use bool as int. # if x > y: count += 1 count += x > y More
Simple re-ale1ster
It is not fits to clear. You can throw away you **re.sub** and use **str.replace**. More
First-mr.floppy 27 1
Some notes about style: no need parenthesis and you miss space after coma return ",".join(phrases).replace("right", "left") More
First-artemrudenko 1
Not only me missed present of **str.isupper** More
First-bukebuer 1
See comments [here](http://www.checkio.org/mission/secret-message/publications/theholy7/python-3/first/) More
First-CaMeLCa5e 2 1
> \# This one use () Tuple? Or unnercessary parenthesis? This comment is confusing. More
re-magdre 3 1
Why not **re.sub(r'[^A-Z]', '', text)**? More
THY-_THY_
Just return result in line 2, no need to use a variable. More
Very Simple-nakanohito_piyo 1
Not so simple as should be. Your lambda can be simplified. More
First-JamesNippoc
Please follow python code style. More
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15