22
Last seen 1 month ago
Member for 1 year, 1 month, 12 days
Difficulty Easy
This is so logical, simple and clear written, a pleasure to read and even more pleasure to understand, thank you for sharing. I now know that my decision has turned around and rushed in the wrong direction. Thank you
More
Great solution! The first line is not superfluous, because according to the conditions:
"""Preconditions:
"text" and "typed" consist of only lowercase English letters and symbols "'/?!.,;
1 <= len(text), len(typed) <= 1000."""
More
This option is easier to read than itertools.cycle.
Is there any difference making the g() function inside caps_lock(text) function or outside?
More
Great solution, easy to read, once I understood how it worked I was thrilled! Thanks for sharing
More
It's a revelation to me that you can use methods like this: str.upper('text'). Cool!
More
Thanks for the clarification, it's nice to see comments on the code
More
The methods are described, but they are not included in the code, so we have a dead code
@property
def health(self):
#print('mi chiedono health',self._health)
return self._health
@health.setter
def health(self,value):
self._health = min(value,type(se
More
Good solution, but Python allows you to fit everything into one line
More
Very interesting solution, learned a lot for myself. Thank you very much for explaining everything in the comments
More
Loved this design:
hp = lambda unit_1, unit_2: (lambda res: [0, res][res > 0])(unit_1.attack * unit_1.is_alive - unit_2.defense)
More