57
Awesome Team
Vedran Čačić
https://web.math.hr/~veky
Last seen 21 hours ago
Member for 11 years, 6 months, 6 days
Difficulty Advanced
We shall not cease from exploration, and the end of all our exploring will be to arrive where we started and know the place for the first time.
What do you think lines 13~17 accomplish? I'm quite sure you're wrong. :-]
More
Very inovative, but surely not clear. And it's not that you actually gain
anything: since you have to calculate and compare distances for two
neighboring items, you could just calculate and compare them for all items.
You'd have a linear algorithmic instead of linearithmic sorting one. :-9
More
You have a weird definition of short. :-D
And 'clear' could also be discussed... taking a simple and intention-clear expression `a ^ b <= c` and naming it `get_count(a, b)` (`get` is a nonword for function names, `count` is surely completely orthogonal to what the function does) is really head-scra
More
Nice (though could be simpler, of course), but the asymmetry between handling hour and minute (oops, time[1]:) is kinda odd. I think better would be
hour, minute = map(int, time.split(':', 1))
More
They surely are. But you succeeded in making it very complicated. :-]
More
It would be an interesting idea to actually use `time.monotonic` for this. :-D
More
A nice idea, but it really can be solved much more Pythonically. At least you should factor out reversing the number.
More
Wouldn't
[x] * f for x, f in items
be nicer than that horrible indexing? :]
More
An interesting question: why are parentheses needed?
A more interesting question: were they needed in all previous versions of Python? ;-)
More
Of course, the len checking can be done in the same way, at the expense of blowing up the code by a factor of at least 2. But that's even more wrong than this. :-D
More
Nice overall idea, but too complicated. tried is completely unnecessary, for example, since base is never decreased. [Here](https://py.checkio.org/mission/checking-perfect-power/publications/veky/python-3/catalan-and-three-bears/) is your solution without unnecessary details. :)
More
You can chain comparisons.
if number % 3 == number % 5 == 0:
Nice to know but not really needed: you can use not % without parentheses (as opposed to C).
if not number % 3:
More
_Why_ did you think you needed line 2? You Py2 folks are so obsessed with lists, it blows my mind. :-D
Also, line 4 is just "if args:".
And you don't need () after return.
More