46
Last seen 11 months ago
Member for 9 years, 4 months, 19 days
Difficulty Normal
dict is good, but `accum` can be generalized, see [my creative](https://py.checkio.org/mission/sum-by-type/publications/flpo/python-3/resultgetstr-resultgetint-0/) :)
More
Hi, as you can see [here](https://py.checkio.org/mission/domino-chain/publications/flpo/python-3/in-search-of-eulerian-path-vincs-solution-discarding-loops/) I think you can remove loops from the graph and count the factor they have on the result only when a valid chain (without loops) were find (no
More
but, in order to be a singleton, Super should be considered old after being `__new__` once :-P
Capital("Kyiv") is Capital("London")
More
of course `Capital("Kyiv") is not Capital("London")` but in this case it should be :-P
More
Hi, I know that this is a creative solution but the positional argument inside the string are simply redundant here: :-)
Changed in version 3.1: The positional argument specifiers can be omitted, so '{} {}' is equivalent to '{0} {1}'.
https://docs.python.org/3/library/string.html#formatstrings
More
Oh, you are right! I often forget about `__r...__`
Thanks for the reminder :-D
More
Hi, [here](https://py.checkio.org/mission/sort-array-by-element-frequency/publications/flpo/python-3/yield-from-repeatitem-count/) a similar solution, with a few more `itertools` batteries :-)
More
Nice! It's very similar to [mine](https://py.checkio.org/mission/bigger-together/publications/flpo/python-3/old-style-sorting/)
More
In (late) response to first comment.
If this one should be in “Creative” category, what about [this one](https://py.checkio.org/mission/secret-message/publications/flpo/python-3/find_message-str_joinfind-message/)? :-D
More
Hi Ylliw, this is quite fast, but [we can go even faster](https://py.checkio.org/mission/light-up/publications/flpo/python-3/deduce-satisfy_constraints-solve/) :-)
More
Very nice! +5!
I think I know why you removed your upvote from my solution. Maybe because of [this](https://py.checkio.org/mission/completely-empty/publications/flpo/python-3/first/share/612979df6ff06e35507119dbe268c076/#comment-54159)? :)
More
[Here](https://py.checkio.org/mission/days-diff/publications/flpo/python-3/composition-of-functions/) is a similar solution implemented as composition of functions
More
Hi,
I would like to suggest you to avoid this general pattern:
if return True else return False
and, instead, just:
return
in your code:
return fw == sw
hope this helps :-)
More
Hi,
I would like to suggest you to avoid this general pattern:
if return True else return False
and, instead, just:
return
in your code:
return f == s
hope this helps :-)
More
Hi, I would like to suggest you to avoid this general pattern:
return True if else False
and, instead, just:
return
in your code:
return len(elements)==0 or elements.count(elements[0])==len(elements)
hope this helps :-)
More
Hi, I would like to suggest you to use the built-in function `bool`. Generally, instead of the pattern `True if else False`, you could simply write `bool()`, in your code:
checkio = lambda x: bool(__import__("re").compile(
'^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{10,}$').fullmat
More
Hi, [here](https://py.checkio.org/mission/sort-array-by-element-frequency/publications/flpo/python-3/with-itertools-batteries-chain-repeat-starmap/) a similar solution, with a few more `itertools` batteries :-)
More
Nice! It's very similar to [mine](https://py.checkio.org/mission/bigger-together/publications/flpo/python-3/old-style-sorting/)
More
Hi,
I would like to suggest you to avoid this general pattern:
if return True else return False
and, instead, just:
return
in your code:
return sorted(lf) == sorted(ls)
hope this helps :-)
More
Nice solution! I wrote an [optimized version](https://py.checkio.org/mission/domino-chain/publications/flpo/python-3/optimized-random-solution/) when I saw this.
More