40
Awesome Team
Alexander Lyabah
http://www.checkio.org/user/oduvan/
Last seen 1 day ago
Member for 13 years, 10 months, 21 days
Difficulty Easy
love it!
[Here](https://py.checkio.org/mission/is-even/publications/eugene100372/python-3/first/share/e2ea5c7705f3512261cb241b44526770/#comment-116766) I've explained how `%` works
Operator `not` first converts int to bool...
* 0 = False
* any non-zero value = True
... then inverts
* True = False
* Fals
More
The % does two things, depending on its arguments. In this case, it acts as the modulo operator, meaning when its arguments are numbers, it divides the first by the second and returns the remainder. `34 % 10 == 4` since 34 divided by 10 is three, with a remainder of four.
More
Imagine how much easier it could be to read.
enemy_mark = 'X' if your_mark == 'O' else 'O'
More
good, except you don't need square brackets in sum. So you work with generator instead of list comprehension
More
You've simply pasted the solution. Did you make it by yourself or copy from somewhere?
More
If you create a variable just to return it right after, means you don't
need that variable.
just do
if conditions:
return
else:
return
More
You can start thinking of better names for variables. For example, ‘a’ can be called ‘words’.
Good naming is also part of the developer’s job.
More