June 2, 2016, 5:15 a.m. |
+ 1 |
for Comment
veky: That's not _wrong_, that's just needlessly complicating things. Same as if x > 5: return True else: ...
|
June 1, 2016, 11:09 a.m. |
+ 1 |
for Comment
hrvoje: Line 23 is very creative, awesome! Have some thumbs :)
|
May 31, 2016, 3:54 p.m. |
+ 4 |
for
Short backwards DFS-StefanPochmann
|
May 31, 2016, 3:53 p.m. |
+ 4 |
for
Counter-gyahun_dash
|
May 31, 2016, 6:37 a.m. |
+ 1 |
for Task
Simplification
|
May 31, 2016, 6:27 a.m. |
+ 4 |
for
__-Cjkjvfnby
|
May 31, 2016, 6:24 a.m. |
+ 1 |
for
Flood Fill-PositronicLlama
|
May 31, 2016, 6:12 a.m. |
+ 3 |
for
named group-gyahun_dash
|
May 31, 2016, 6:10 a.m. |
+ 2 |
for
slice forward-blabaster
|
May 30, 2016, 1:46 p.m. |
+ 1 |
for Comment
DiZ: Is is called an [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm) ;-)
|
May 30, 2016, 1:09 a.m. |
+ 1 |
for Comment
Lasica: I'd like to put some light on mysterious t21 and t31 lists. For other reviewers wondering how does t...
|
May 30, 2016, 12:30 a.m. |
+ 2 |
for
First-canassa
|
May 30, 2016, 12:18 a.m. |
+ 4 |
for
First-takapt0226
|
May 27, 2016, 10:50 a.m. |
+ 4 |
for
First-gyahun_dash
|
May 27, 2016, 10:48 a.m. |
+ 1 |
for
First-ciel
|
May 27, 2016, 9:11 a.m. |
+ 1 |
for Comment
veky: While you're there, take a look at Counter. Extremely useful class. :-)
|
May 27, 2016, 9:10 a.m. |
+ 1 |
for Comment
veky: Yes. The usual answer to "why Python has no switch statements" is "because it has dicts". ;-)
|
May 27, 2016, 3:01 a.m. |
+ 4 |
for
First-Sim0000
|
May 27, 2016, 2:58 a.m. |
+ 4 |
for
Double ended-veky
|
May 27, 2016, 2:54 a.m. |
+ 1 |
for Comment
veky: Imagine you have a list x of million items. What does x.pop(0) do? * it returns x[0] * it sets x[0] ...
|
May 27, 2016, 2:52 a.m. |
+ 2 |
for
Stack-veky
|
May 27, 2016, 2:26 a.m. |
+ 1 |
for Comment
DiZ: This is an heap-based Dijkstra's algorithm: it constructs the right path by testing all possibilitie...
|
May 27, 2016, 2:23 a.m. |
+ 1 |
for
set-gyahun_dash
|
May 27, 2016, 2:21 a.m. |
+ 1 |
for
First-gyahun_dash
|
May 27, 2016, 2:21 a.m. |
+ 1 |
for Comment
veky: It's strange that you didn't reuse area in volume. And if you want to be a wizard, corners can be mu...
|
May 26, 2016, 10:19 a.m. |
+ 4 |
for
The Key-bryukh
|
May 25, 2016, 2:23 p.m. |
+ 1 |
for Comment
veky: Yes. You'll notice that the "essence" of a solution, try/except lines, are getting drowned in increa...
|
May 25, 2016, 10:44 a.m. |
+ 1 |
for Comment
veky: It can be anything callable (returning an int-like thing). Look: class Bandersnatch: def __call__(se...
|
May 25, 2016, 10:20 a.m. |
+ 1 |
for Comment
veky: As I told you in another comment, all CiO wants is (in the true ducktyping manner) something it can ...
|
May 25, 2016, 10:07 a.m. |
+ 1 |
for Comment
veky: Imagine if the system was different. Imagine the task says: you have an integer named n. Write a sta...
|
May 25, 2016, 7:45 a.m. |
+ 2 |
for
Hinted-veky
|
May 25, 2016, 7:42 a.m. |
+ 2 |
for
Hinted-veky
|
May 25, 2016, 7:42 a.m. |
+ 1 |
for Comment
veky: `lambda` is not a function, it is a way of constructing functions (like `def` is, for example). But ...
|
May 25, 2016, 7:40 a.m. |
+ 1 |
for
First-dagger126
|
May 25, 2016, 7:36 a.m. |
+ 2 |
for
simpler-mr.floppy
|
May 25, 2016, 7:35 a.m. |
+ 1 |
for Comment
veky: Nice. Even I didn't know timedelta has \_\_abs\_\_. :-)
|
May 25, 2016, 2:02 a.m. |
+ 1 |
for Task
Mind Switcher
|
May 24, 2016, 10:55 a.m. |
+ 2 |
for
filter-veky
|
May 24, 2016, 10:15 a.m. |
+ 1 |
for Comment
veky: Listcomp is usually ok if you really do want a list as an output. Here you don't: you want str, so y...
|
May 24, 2016, 10:13 a.m. |
+ 1 |
for Comment
veky: The truth is (as always), it depends. Not _everything_ in Python is adapted completely to EAFP style...
|
May 24, 2016, 10:13 a.m. |
+ 1 |
for Comment
veky: It is short because the task is simple. Ideal programming language should have solutions of approxim...
|
May 24, 2016, 9:36 a.m. |
+ 4 |
for
First-gyahun_dash
|
May 24, 2016, 9:08 a.m. |
+ 4 |
for
Convert and Iterate-bryukh
|
May 24, 2016, 9:05 a.m. |
+ 2 |
for
operators-Cjkjvfnby
|
May 24, 2016, 9 a.m. |
+ 1 |
for
Max Min-bryukh
|
May 24, 2016, 8:44 a.m. |
+ 1 |
for Comment
veky: "Clever compiler" would have to be _much_ more clever than you think. It's perfectly possible that "...
|
May 24, 2016, 8:41 a.m. |
+ 4 |
for
Slice-bryukh
|
May 24, 2016, 8:38 a.m. |
+ 4 |
for
Indexcept-veky
|
May 24, 2016, 8:35 a.m. |
+ 1 |
for Comment
veky: Many. :-) EAFP. Read [this](http://www.checkio.org/mission/number-radix/publications/tdietert/python...
|
May 24, 2016, 8:33 a.m. |
+ 1 |
for
First-Hanna_Hofman
|
May 24, 2016, 12:09 a.m. |
+ 4 |
for
branch if box-DiZ
|
May 23, 2016, 3:01 p.m. |
+ 1 |
for Task
One line Drawing
|
May 23, 2016, 3 p.m. |
+ 4 |
for
lol spaggeti!-iggymas
|
May 23, 2016, 8:02 a.m. |
+ 1 |
for Task
Numbered Triangles
|
May 23, 2016, 2:39 a.m. |
+ 1 |
for Task
Radiation Search
|
May 23, 2016, 2:12 a.m. |
+ 1 |
for Task
Univocalic Factaral
|
May 22, 2016, 1:32 a.m. |
+ 1 |
for Task
Vigenere Cipher
|
May 21, 2016, 2:35 p.m. |
+ 1 |
for Task
What Does the Cow Say?
|
May 21, 2016, 5:28 a.m. |
+ 1 |
for Task
Numbers Factory
|
May 21, 2016, 4:13 a.m. |
+ 1 |
for Task
Three Points Circle
|
May 21, 2016, 2:50 a.m. |
+ 1 |
for Task
Find Sequence
|
May 20, 2016, 3:21 a.m. |
+ 1 |
for Task
Moria Doors
|
May 20, 2016, 2:57 a.m. |
+ 1 |
for Task
Restricted Sum
|
May 20, 2016, 2:46 a.m. |
+ 1 |
for Task
The Hamming Distance
|
May 20, 2016, 2:26 a.m. |
+ 1 |
for Task
Letter Queue
|
May 20, 2016, 2:17 a.m. |
+ 1 |
for Task
Brackets
|
May 17, 2016, 9:41 a.m. |
+ 4 |
for
First-zero_loss
|
May 17, 2016, 7:50 a.m. |
+ 1 |
for Comment
halo107: I also use chrome for mac and meet the same problem as you, every time, I check the view-source of t...
|
May 17, 2016, 7:43 a.m. |
+ 4 |
for
combination-Sim0000
|
May 17, 2016, 5:49 a.m. |
+ 1 |
for Comment
Sim0000: My solution use Dijkstra only. We can see given map as two layer map with extra direction up and dow...
|
May 16, 2016, 8:48 a.m. |
+ 3 |
for
First-JulianNicholls
|
May 10, 2016, 1:34 p.m. |
+ 1 |
for Task
Express Delivery
|
May 10, 2016, 8:36 a.m. |
+ 1 |
for Task
Open Labyrinth
|
May 10, 2016, 8:05 a.m. |
+ 1 |
for Task
Golden Pyramid
|
May 9, 2016, 7:05 a.m. |
+ 1 |
for Comment
veky: Algorithm that doesn't work doesn't work, no matter how many tests it doesn't pass. :-)
|
May 9, 2016, 6:57 a.m. |
+ 1 |
for Comment
bryukh: That means in rings you can find all numbers from 1 to N.
|
May 9, 2016, 6:56 a.m. |
+ 1 |
for Task
Break Rings
|
May 9, 2016, 6:16 a.m. |
+ 3 |
for
Table look up-cmchao
|
May 9, 2016, 5:49 a.m. |
+ 3 |
for
Simulated-PositronicLlama
|
May 7, 2016, 4:47 a.m. |
+ 3 |
for
Do the math-nickie
|
May 7, 2016, 4:42 a.m. |
+ 1 |
for Comment
veky: LOL. The shorter I write the code, the longer the explanations in the comments are. :-D Good work. :...
|
May 3, 2016, 9:19 a.m. |
+ 1 |
for Task
Pearls in the Box
|
May 3, 2016, 7:50 a.m. |
+ 3 |
for
golf-minto
|
May 3, 2016, 7:44 a.m. |
+ 1 |
for Comment
narimiran: Line 10: return str_b.rjust(8, '0') Similarly, line 38: str_b = str_b.ljust(32, '0') Lines 40-45: st...
|
May 3, 2016, 7:43 a.m. |
+ 1 |
for Comment
narimiran: Line 8: maybe something like this: for col, row in pawns: would help with the readability later. Als...
|
May 3, 2016, 7:43 a.m. |
+ 1 |
for Comment
narimiran: > I think it’s clear but seems has lots of ways to optimize… You already imported calendar - why did...
|
April 24, 2016, 2:22 a.m. |
+ 1 |
for Comment
veky: You _only_ have to know (or dare to hope:) that there is a module to do what you want. Then you go t...
|
April 20, 2016, 3:33 a.m. |
+ 3 |
for
First-zcjsword
|
April 20, 2016, 3:33 a.m. |
+ 1 |
for Comment
zcjsword: @ljy95135 I am happy to. As mentioned in my headline comments, no need to loop through the entire ye...
|
April 20, 2016, 1:09 a.m. |
+ 1 |
for Comment
veky: len([x for whatever if cond]) ~~~> sum(cond for whatever) Faster, shorter, less memory-intensive and...
|
April 20, 2016, 1:06 a.m. |
+ 1 |
for
With lovely lambda expression-veghadam1991
|
April 20, 2016, 1:02 a.m. |
+ 3 |
for
Without datetime-ciel
|
April 20, 2016, 12:57 a.m. |
+ 1 |
for Comment
veky: > eye-opening. The title is suggestive. ;-) > Seems that as long as knew a module or method exists b...
|
April 19, 2016, 3:19 p.m. |
+ 2 |
for
Assault of batteries-veky
|
April 19, 2016, 3:16 p.m. |
+ 2 |
for
First...-k_spamowe
|
April 19, 2016, 3:02 p.m. |
+ 1 |
for Task
Solution for Anything
|
April 19, 2016, 9:34 a.m. |
+ 1 |
for Task
The Longest Palindromic
|
April 19, 2016, 7:23 a.m. |
+ 1 |
for Task
IP Network: Route Summarization
|
April 19, 2016, 7:13 a.m. |
+ 2 |
for
Without if/else-martin_b
|
April 19, 2016, 7:11 a.m. |
+ 1 |
for
Random fact: Abraham Lincoln was the first president to ever be photographed at his inauguration.-siebenschlaefer
|