40
Awesome Team
Alexander Lyabah
http://www.checkio.org/user/oduvan/
Last seen 14 hours ago
Member for 13 years, 10 months, 21 days
Difficulty Easy
love it!
I think having a simple marker `is_abs` can replaces lines 2 and 9 by:
is_abs = path.startswith('/')
if is_abs: return '/'
More
Thank you @veky, this is something new for me today
https://docs.python.org/3/library/contextlib.html#contextlib.suppress
More
Since you have typehints in function definition, you don’t need an extra
comment for that
More
Imagine how much easier it could be to read.
enemy_mark = 'X' if your_mark == 'O' else 'O'
More
we are looking for the best solution for this mission.
Upvote if you like it
More
the fact of using
checkio=lambda*a:
instead of
def checkio(a):
make it look like puzzle for me
More
+1 for the right and clear solution
-1 I would do lambda as an main function only for puzzle solution :)
More
idea was stolen from http://www.checkio.org/mission/end-of-other/publications/Faibbus/python-3/first/
More
One liner from this one https://py.checkio.org/mission/roman-numerals/publications/mdeakyne/python-3/first/share/53882d47af904f942fc8daf06c0ed270/
More
Do not mix camelcase
getSizeColumns getColumnsForEncode
and undescore
decode_amsco encode_amsco
For Python underscore is always the best choice :)
More