July 29, 2020, 6:11 p.m. |
+ 1 |
for Comment
joseke: While I do not fully understand the logic, anyone can clearly see how elegant this solution is. I pa...
|
April 2, 2020, 12:23 p.m. |
+ 1 |
for Comment
undead2k: Sorry for reviving an old thread, just trying to understand what is going on with **first_word_2** e...
|
March 28, 2020, 6:53 p.m. |
+ 1 |
for Comment
NickJepson: Excellent simple solution - one liners are best for efficiency but watch for clarity
|
March 2, 2020, 6:33 a.m. |
+ 1 |
for Comment
przemyslaw.daniel: >>> backward_string_by_word(' abc 123') 'cba 321 '
|
Sept. 19, 2019, 6:33 a.m. |
+ 1 |
for Comment
nakanohito_piyo: Great, it is really easy to deal arrays with numpy.
|
June 13, 2019, 4:14 a.m. |
+ 1 |
for Comment
veky: Obligatory Youtube link: https://www.youtube.com/watch?v=o9pEzgHorH0 :-)
|
June 8, 2019, 12:55 p.m. |
+ 1 |
for Comment
Tical_1000: Beautiful. I haven’t seen the filter function used for quite some time. Very nice implementation.
|
April 23, 2019, 1:17 p.m. |
+ 1 |
for Comment
Oksana_Antropova: That's a really cool solution! Mine had the same logic behind, but is implemented with simple `for`,...
|
April 23, 2019, 12:26 p.m. |
+ 1 |
for Comment
cglacet: Why would you avoid `if`, avoid `str` first :p
|
April 12, 2019, 8:07 a.m. |
+ 1 |
for Comment
Oksana_Antropova: In my opinion, it would be better to use search instead of findall and capturing group: search(f"\{a...
|
April 11, 2019, 5:03 a.m. |
+ 1 |
for Comment
juestr: Nice, I felt changing the const arrays was cheating, but it really makes it much simpler so why not.
|
March 27, 2019, 3:59 p.m. |
+ 1 |
for Comment
Phil15: I started timeit random tests before I see you already did it. But I test the current ten published ...
|
March 25, 2019, 7:22 p.m. |
+ 1 |
for Comment
Phil15: For info, `next_enemy[int(not i)]` and `next_enemy[not i]` are equivalent. We have list[True] == lis...
|
March 15, 2019, 2:11 p.m. |
+ 1 |
for Comment
7nat7: Nice, did'nt know about f-strings before.
|
March 8, 2019, 6:20 p.m. |
+ 1 |
for Comment
JimmyCarlos: Perfect use of ReGex! This is almost a perfect task for ReGex.
|
Dec. 20, 2018, 2:08 p.m. |
+ 1 |
for Comment
chchun: str(array) is good method!!! I solved only recursive approach. but this approach is very simple.
|
Dec. 19, 2018, 9:14 a.m. |
+ 1 |
for Comment
Joeri: I needed to write it down with an example to see what it is you're comparing, but then I got it. You...
|
Dec. 6, 2018, 6:22 p.m. |
+ 1 |
for Comment
wcass77: Note that popping from a list and adding it to the front like this is very inefficient. The entire l...
|
Nov. 30, 2018, 9:49 p.m. |
+ 1 |
for Comment
JohanL: Consider using a Python dict rather than the two tuples for the roman and arab numbers. That is a mo...
|
Nov. 19, 2018, 7:02 a.m. |
+ 1 |
for Comment
chchun: fastest_horse([['1:10', '1:15', '1:02'], ['1:15', '1:15', '1:15'], ["2:59", "2:59", "2:59"]]) == 3 i...
|
Oct. 15, 2018, 7:05 p.m. |
+ 1 |
for Comment
Merzix: No need create empty set `extra = set()` because you did not use it next. Just `extra = False`. Also...
|
Sept. 26, 2018, 9:04 a.m. |
+ 1 |
for Comment
swhcz: I suspected there would be a mathematical solution to this, nice to see this implemented!!
|
Sept. 23, 2018, 8:47 a.m. |
+ 1 |
for Comment
Phil15: **1** If you want to write range(len(thing)) you probably should use enumerate(thing). m_rotated = [...
|
Sept. 23, 2018, 8:26 a.m. |
+ 1 |
for Comment
Phil15: Why a while loop here? Instead of for amount in range(3, len(numbers)+1) The flag thing... flag = al...
|
Sept. 17, 2018, 5:38 a.m. |
+ 1 |
for Comment
Oleg_Domokeev: I like this clear solution. Thank you. One can easy understand the logic of algorithm: for every pai...
|
Sept. 10, 2018, 9:07 a.m. |
+ 1 |
for Comment
Phil15: I will have used math.inf instead of 1e10 (or split into 2 cases), and 0 instead of 1e-6 (so r==int(...
|
Sept. 9, 2018, 2:21 p.m. |
+ 1 |
for Comment
przemyslaw.daniel: You recognize Solmyr! My obeisances
|
July 11, 2018, 4:13 a.m. |
+ 1 |
for Comment
von.Oak: Smart using numpy. On the other side, it is approximately 2x slower than a classic solution without ...
|
July 11, 2018, 4:10 a.m. |
+ 1 |
for Comment
von.Oak: Hello, it's not so effective if you make 3x `sorted` on `data`. It's better to sort only once and th...
|
June 29, 2018, 9:26 p.m. |
+ 1 |
for Comment
grutte_pier: Since you have the math skills to derive the equation, I really don't understand why you didn't just...
|
June 29, 2018, 7:08 a.m. |
+ 1 |
for Comment
kuzdras: At first it seems complicated but it's really clear and description is very good. You took interesti...
|
June 20, 2018, 10:55 a.m. |
+ 1 |
for Comment
suic: Hi, 1. Don't comment obvious things. It's not useful. 2. All that "magic" with `Counter.most_common`...
|
June 19, 2018, 6:17 p.m. |
+ 1 |
for Comment
andreff73: There is no need to use strip() method after split(). Because there are no leading and trailing spac...
|
June 17, 2018, 7:18 p.m. |
+ 1 |
for Comment
Cjkjvfnby: http://www.checkio.org/forum/post/1618/proper-way-to-check-if-sequence-is-empty/
|
May 13, 2018, 12:59 p.m. |
+ 1 |
for Comment
suic: Hi, the use of `%` is nice but this solution is very inefficient as `str` is immutable and the follo...
|
May 2, 2018, 12:01 p.m. |
+ 1 |
for Comment
alexander.gorelyshev: Clear, clever and simple. My only suggestion is to check instead for `letter.isalpha()` and just ret...
|