32
Awesome Team
Mykhailo Ohorodnikov
https://ogoro.me
Last seen 1 year ago
Member for 3 years, 8 months, 27 days
Difficulty Normal
Python developer with telecom background - Kyiv, Ukraine
many thanks for insight on coroutine and passing values to generator function!)
More
which led to dictionary of transform functions:
https://py.checkio.org/mission/roll-the-cube/publications/ogoro/python-3/transforms/
)
More
many thanks for the insight on singledispatchmethod!)
inspired by this solution - used it without annotations - but as decorator with parameter:
https://py.checkio.org/mission/voice-tv-control/publications/ogoro/python-3/single-dispatch-method/
)
More
thank you for the solution - clear and efficient!)
don't you know why no-one seems to use re.Scanner for this mission?
it is from Python Cookbook, looks very convenient - for example:
https://py.checkio.org/mission/hacker-language/publications/ogoro/python-3/scanner-with-code-dictionary/
)
More
initial version:
https://py.checkio.org/mission/hacker-language/publications/ogoro/python-3/scanner/
)
More
which led to more compact:
https://py.checkio.org/mission/hacker-language/publications/ogoro/python-3/scanner-with-code-dictionary/
with lambda transcode dictionaries)
More
very interesting solution, thank you!)
1 )
volume = lambda *_: 0
>>> a, *_ = (1,2,3)
>>> a
1
2 )
3..__rpow__
lambda x: pow(x, 3.)
https://docs.python.org/3/reference/datamodel.html
More
very interesting regex substitution to add thousand space delimiter:
re.sub(r"\B(?=(?:\d{3})+$)", " ", str(salary * working_years * 12))
\B - not at the beginning of the string
(?:\d{3}) - non-capturing group of 3 digits
(?:\d{3})+ - one or more of such groups
(?:\d
More
thanks a lot for ... Ellipsis!
https://stackoverflow.com/questions/772124/what-does-the-ellipsis-object-do
https://www.python.org/dev/peps/pep-0484/#callable
very interesting)
More
interesting solution, thank you!
i suppose, you could use:
datetime.max
for
END = datetime(9999, 12, 31, 23, 59, 59)
)
More
which led to more creative solution:
- lambda dictionary
- dict merge
- exhaustive pairwise sum
- antidiagonal flip)
https://py.checkio.org/mission/simple2048/publications/ogoro/python-3/antidiagonal/
More
interesting usage of hash, thank you)
does it have any advantages over usual comparison?
More