35
fed.kz
16 41 58 Leader of the month
7437/ 7695
Фёдор Кузнецов
Last seen 11 months ago
Member for 5 years, 11 months, 1 day
Difficulty Normal
Just a student from Russia. Started learn python on Checkio.

Best reviews / Newest reviews
First-Merzix 4
You could replace the expression in a line 4: not (y < 20 or y > 40) in another 20 <= y <= 40 On example: first = lambda y: not(y<20 or y>40) second = lambda y: 20<=y<=40 all(first(x) == second(x) for x in range(100)) # True More
dict comprehension-vit.aborigen 3 1
Next time just use `text.lower().split()` instead `text.lower().replace('\n', ' ').split(' ')` More
No patterns-vit.aborigen 2 1
Simple and compact, looks great More
29-liner: no looping with property-przemyslaw.daniel 2 1
It's cool! But this method will not work in missions, where warrior have attack=0. Although I think you know this and you have a way to fix it) More
use datetime-Merzix 1 2
Why do not you rewrite it as a 1-line lambda-function? More
One-lined-Alex-Elf 1
`key = lambda x: len(x)` is the same thing `key=len` More
Card Game-JimmyCarlos 1 1
If I understood your decision correctly, you could use `for deckI in range(min(hand), deck)` in line 5, or is it not? More
Numpy & groupby-vit.aborigen 1
Wow. really like this solution. Nice use numpy for this task More
First-cedek95 1
Your strings 2-6 could be replaced to `bin(number)` More
timedelta-vit.aborigen 1 1
Short and readable, but so many time for tests with a large date interval. Please view [this solution and comments](https://py.checkio.org/mission/weekend-counter/publications/Merzix/python-3/with-cycle-from-itertools/) More
First-fed.kz 1
You pass two parameters to the `add_units` method. `_type` is a type of warrior. `_type()` creates an instance of the class. At this stage it is `Warrior` or `Knight`. In the future may be `Healer`, `Vampire` and others. I did not want to use the reserved name `type`, so I changed it to `_type`. More
Party Invitations-BrianMcleod 1
Nice! I have the same solution, but other variables names) More
One-line function-likewind 1 1
bin returns a string, so you could delete 'str()' More
2-liner with cycle from itertools-Merzix 1 1
For tests with a large date interval this solution waste very much time. On example checkio(date(13, 9, 18), date(2013, 9, 23)) average lead time 1.25 seconds More
Time Converter (24h to 12h)-JimmyCarlos 1 1
What does the expression in the last line do? {:0>2} Is this a slice of the string minutes? How it works? More
First-vit.aborigen 1 1
Why not just equate methods? def __gt__(self, other): return True __ne__ = __le__ = __eq__ = __lt__ = __ge__ = __gt__ Or use lambda-functions? More
One-liner-vit.aborigen 1 1
It's not principial, but you can use `join` with generator, you do not have to create a list and pass it to join. More
Set-vit.aborigen 1
Nice, but you often use the same algorithm check winner. Why not define function `checker` and use it? def checker(cells): if len(set(cells)) == 1 and cells[0] != '.': return cells[0] for row in game_result: if checker(row): return row[0] etc. More
First-yoichi 1
if self._birth_date[:-4] == '01.01.': return 2018 - int(self._birth_date[-4:]) else: return 2018 - int(self._birth_date[-4:]) - 1 Can be replaced to: return 2018 - int(self._birth_date[-4:]) - self._birth_date[:-4] == "01.01." Or just `2018 - 1` can be replaced to `201 More
First-vit.aborigen 1
issubclass(bool, int) == True x = 1 x += True x == 2 # True So you can use: counter += all("condition" for ... in expression) instead counter += all(1 if "condition" else 0 for ... in expression) More
1
2 3