Nov. 23, 2017, 1:42 p.m. |
+ 1 |
for Comment
nvie: So long formatting and readability. There's nothing less nifty about this if you would've added some...
|
Nov. 23, 2017, 1:42 p.m. |
+ 1 |
for Comment
guido: def checkio(labyrinth): # I'm definetely a fan of Dijkstra's (!!!) Funny, Dijkstra is a person, but ...
|
Nov. 23, 2017, 1:41 p.m. |
+ 1 |
for Comment
veky: You don't need "fizz_buzz and" at the beginning of line 3. str is a collection too. ;-)
|
Nov. 23, 2017, 1:36 p.m. |
+ 1 |
for Comment
DiZ: Here you must distinguish two types of assignment: - Multiple assignment: a, b = 0, 1 - Multiple-tar...
|
Nov. 23, 2017, 1:32 p.m. |
+ 1 |
for Comment
odwl: So you mean return bin(number).count() That is the easiest I have seen so far
|
Feb. 12, 2015, 9:30 a.m. |
+ 1 |
for Comment
veky: Comments are important. The problem is, they are not important in the way newbies think they are. Fi...
|
Nov. 15, 2014, 10:52 p.m. |
+ 1 |
for
Pointless?-veky
|
Nov. 15, 2014, 10:49 p.m. |
+ 1 |
for Comment
veky: At first sight, this is usual high-order functional stuff. But there are a few puzzling details, in ...
|
Nov. 15, 2014, 10:05 p.m. |
+ 1 |
for
Single ended-veky
|
Nov. 14, 2014, 7:10 a.m. |
+ 1 |
for Comment
veky: cfore insel. ;)
|
Nov. 5, 2014, 9:36 a.m. |
+ 1 |
for Comment
maurice.makaay: I don't think unclear code can be caused by the use of imports (but I see that dirk86 already agreed...
|
Oct. 31, 2014, 9:02 a.m. |
+ 1 |
for Comment
vinc: Yes. This is a good clarification. eval(obj.__repr__()) == obj
|
Oct. 20, 2014, 7:22 a.m. |
+ 1 |
for Comment
spoty: Your solution?
|
Oct. 7, 2014, 6:52 p.m. |
+ 1 |
for Comment
artemrudenko: To get rid of i[0] and i[1] you can write: for rshift, cshift in moor: Aslo there is no any need to ...
|
Sept. 29, 2014, 6:46 p.m. |
+ 1 |
for Comment
veky: Nice rule of thumb: whenever you see "range(len(" in your code, you should probably use enumerate. ;...
|
Sept. 29, 2014, 5:56 p.m. |
+ 1 |
for Comment
veky: You can drop the []. "".join(l for ...) is clearer, more direct, uses less memory, and potentially f...
|
Sept. 17, 2014, 11:44 p.m. |
+ 1 |
for Comment
veky: This concrete example is a bit controversial, since "".join might benefit greatly from knowing in ad...
|
Sept. 9, 2014, 3:28 p.m. |
+ 1 |
for Comment
oduvan: Agreed. This is a strange name
|
Aug. 13, 2014, 10:47 a.m. |
+ 1 |
for
Letter Queue-diegueus9
|
Aug. 13, 2014, 10:47 a.m. |
+ 1 |
for
First-vakalachev
|
Aug. 13, 2014, 10:34 a.m. |
+ 1 |
for Comment
veky: "if len(queue) > 0" is just "if queue".
|
Aug. 12, 2014, 7:37 a.m. |
+ 1 |
for Comment
masero: Hi, as endswith() accepts tuples, isn't better to write for w in words: if w.endswith(tuple(x for x ...
|
Aug. 1, 2014, 1:07 p.m. |
+ 1 |
for Comment
xtofl: nice one! The `zip` doesn't add much, though - you can just as well hand-zip it, and keep the relati...
|
July 28, 2014, 2:38 p.m. |
+ 1 |
for Comment
compscialien: Would be more clear and educational with comments to add context to the code. Many beginners do not ...
|
July 28, 2014, 9:31 a.m. |
+ 1 |
for
reduce-Flid
|
July 9, 2014, 8:46 p.m. |
+ 1 |
for Comment
gyahun_dash: You don't need to worry about IndexError (-n < (j - i) < n).
|
July 1, 2014, 5:13 p.m. |
+ 1 |
for Comment
Talim42: try solving some other tasks, read sulutions of veky, there are some really techiniques in them
|
June 14, 2014, 10:23 p.m. |
+ 1 |
for
First-gyahun_dash
|
June 10, 2014, 10:05 p.m. |
+ 1 |
for Comment
veky: "Clear" shouldn't mean enormous code duplication and inventing the wheel from scratch. You should kn...
|
June 7, 2014, 11:48 p.m. |
+ 1 |
for
First-nickie
|
June 1, 2014, 7:37 a.m. |
+ 1 |
for
slice forward-blabaster
|
May 28, 2014, 9:53 p.m. |
+ 1 |
for Post
messy task
|
May 24, 2014, 6:13 p.m. |
+ 1 |
for Comment
veky: Care to timeit? You might get surprised. ;-P I really hate it when people learn something from anoth...
|
May 20, 2014, 7:13 p.m. |
+ 1 |
for Comment
ciel: Or we can add precondition that all elements are positive. How would you like, Wei5?
|
May 18, 2014, 6:17 p.m. |
+ 1 |
for Comment
veky: Maximal product could be negative, in which case your code won't work.
|
May 18, 2014, 6:14 p.m. |
+ 1 |
for
Obvious-veky
|
May 18, 2014, 2:03 p.m. |
+ 1 |
for Comment
veky: Check out str.startswith. ;-)
|
May 16, 2014, 8:31 p.m. |
+ 1 |
for
Try-veky
|
May 16, 2014, 8:03 p.m. |
+ 1 |
for
Second-gyahun_dash
|
May 12, 2014, 3:08 p.m. |
+ 1 |
for
Second-gyahun_dash
|
May 12, 2014, 2:08 p.m. |
+ 1 |
for
First-gyahun_dash
|
May 12, 2014, 1:11 p.m. |
+ 1 |
for
Both-veky
|
May 12, 2014, 8:04 a.m. |
+ 1 |
for Post
Game statistics and point system
|
May 9, 2014, 5:59 a.m. |
+ 1 |
for Comment
Sim0000: You don't need iter.
|
May 4, 2014, 4:47 p.m. |
+ 1 |
for Comment
gyahun_dash: Thank you. I've heard that we would rather not use printf-style because it can be deprecated('Backwa...
|
April 27, 2014, 6:55 a.m. |
+ 1 |
for Comment
veky: You know my opinion on this. Strongly against. You're trying to solve a problem you yourself made. P...
|
April 26, 2014, 10:55 p.m. |
+ 1 |
for
auto-painting-bunnychai
|
April 22, 2014, 12:04 p.m. |
+ 1 |
for Comment
veky: > Although it's not really a big deal, I am curious of how should I use python effectively in compar...
|
April 17, 2014, 2:02 p.m. |
+ 1 |
for Comment
kamikaze: nice. but while you are trying to reduce line count you are violation PEP-8 and readability :)
|
April 15, 2014, 11:09 a.m. |
+ 1 |
for Comment
Eldin: I'm still learning Python and when looking around how to break out of nested loops, I found that the...
|
April 13, 2014, 9:02 p.m. |
+ 1 |
for
First-coells
|
April 13, 2014, 8:57 p.m. |
+ 1 |
for
First-janpaweldrugi
|
April 13, 2014, 8:45 p.m. |
+ 1 |
for
First-makoto_yamagata
|
March 30, 2014, 6:18 a.m. |
+ 1 |
for Comment
Sim0000: Since I have little experience of Python, such advice is very helpful. Now, I improved the code. Ple...
|
March 29, 2014, 8:11 p.m. |
+ 1 |
for
Straightforward-nickie
|
March 24, 2014, 9:31 p.m. |
+ 1 |
for Comment
nickie: I believe we have the same algorithm with a few rather technical differences, affecting performance ...
|
March 23, 2014, 11:56 p.m. |
+ 1 |
for
Second-natsuki
|
March 22, 2014, 10:55 p.m. |
+ 1 |
for Comment
bryukh: Nope. It's work because this fragment is not called for the tests.
|
March 19, 2014, 10:34 p.m. |
+ 1 |
for
First-ignalion
|
March 6, 2014, 7:20 p.m. |
+ 1 |
for
^-veky
|
March 5, 2014, 9:24 p.m. |
+ 1 |
for Comment
veky: You're making yourself jump through hoops without any reason. I hate when people deliberately tie th...
|
March 5, 2014, 5:15 p.m. |
+ 1 |
for Comment
shisashi: My idea is to sort words by reversed word. It makes enough only compare with a next word. Then, I th...
|
March 4, 2014, 11:38 a.m. |
+ 1 |
for
Iterative-PositronicLlama
|
March 4, 2014, 11:28 a.m. |
+ 1 |
for
First-JulianNicholls
|
March 3, 2014, 6:52 a.m. |
+ 1 |
for Comment
bukebuer: Will remember that. I used to use lambda as key and forgot there may be simple ways instead.
|
March 3, 2014, 6:52 a.m. |
+ 1 |
for Comment
ciel: Do you mean "lambda e: abs(e)" can be written simply as "abs"? It seems right...
|
March 2, 2014, 9:10 p.m. |
+ 1 |
for
lambda lambda-veky
|
March 1, 2014, 10:43 p.m. |
+ 1 |
for Comment
veky: This is very wrong. docstrings aren't meant to be used like that. They are the help to someone _usin...
|
March 1, 2014, 10:20 p.m. |
+ 2 |
for
Second-jcg
|
March 1, 2014, 10:08 p.m. |
+ 1 |
for
Straightforward-veky
|
March 1, 2014, 11:27 a.m. |
+ 1 |
for
First-Hanna_Hofman
|
March 1, 2014, 11:16 a.m. |
+ 1 |
for Comment
veky: > Cool. Do you have some public repos? What kind of code you wrote for production? Unfortunately, no...
|
Feb. 27, 2014, 12:01 p.m. |
+ 1 |
for Comment
veky: Bravo. Now you understand. :-) Next level: what is the difference between b if a else c and a and b ...
|
Feb. 27, 2014, 9:33 a.m. |
+ 1 |
for
First-ciel
|
Feb. 26, 2014, 11:45 p.m. |
+ 1 |
for
and-veky
|
Feb. 26, 2014, 11:22 p.m. |
+ 1 |
for
First-tdhr
|
Feb. 26, 2014, 11:22 p.m. |
+ 1 |
for
Max Min-bryukh
|
Feb. 26, 2014, 8 p.m. |
+ 1 |
for
First-shiracamus
|
Feb. 26, 2014, 7:48 p.m. |
+ 1 |
for
First-f_rin_kazan
|
Feb. 26, 2014, 7:40 p.m. |
+ 1 |
for
First-LexCavalera
|
Feb. 26, 2014, 7:40 p.m. |
+ 1 |
for
for else-veky
|
Feb. 26, 2014, 7:20 p.m. |
+ 1 |
for
First-Gennady
|
Feb. 26, 2014, 7:19 p.m. |
+ 1 |
for
Second-apranav19
|
Feb. 25, 2014, 11:09 p.m. |
+ 1 |
for
First-pop_saitou
|
Feb. 25, 2014, 10:57 p.m. |
+ 1 |
for
BuFi#-veky
|
Feb. 25, 2014, 10:40 p.m. |
+ 1 |
for
First-LexCavalera
|
Feb. 25, 2014, 10:31 p.m. |
+ 1 |
for
Third-ROBCHI
|
Feb. 25, 2014, 10:07 p.m. |
+ 1 |
for
First-RRRQ
|
Feb. 19, 2014, 8:53 a.m. |
+ 1 |
for Comment
guido: It's interesting that you prefer making several passes over the input string just to avoid splitting...
|
Feb. 19, 2014, 8:43 a.m. |
+ 1 |
for
Generator-guido
|
Feb. 17, 2014, 11:43 p.m. |
+ 1 |
for Comment
ajmssc: Thanks! Still learning. Did you mean the spacing between operators?
|
Feb. 17, 2014, 3:05 p.m. |
+ 2 |
for
template-veky
|
Feb. 16, 2014, 9:49 a.m. |
+ 1 |
for
First-petrushev
|
Feb. 13, 2014, 3:46 p.m. |
+ 1 |
for Comment
bryukh: Ok. You are right. Thanks. I will take into account it for future tasks.
|
Feb. 10, 2014, 8:13 a.m. |
+ 1 |
for Comment
oduvan: Category is not only about "what criteria meets my solution?" but also "How do I want community to j...
|
Feb. 9, 2014, 4:28 p.m. |
+ 1 |
for
First-simleo
|
Feb. 9, 2014, 4:25 p.m. |
+ 1 |
for
Look it up!-nickie
|
Feb. 9, 2014, 4:16 p.m. |
+ 1 |
for
Formula-bryukh
|
Feb. 7, 2014, 12:56 a.m. |
+ 1 |
for
Check-Rotate-Check-bryukh
|
Feb. 1, 2014, 1:18 a.m. |
+ 1 |
for Comment
UndeadMonkey: Not very readable, but looks succinct. Perhaps better naming of the variables would have helped.
|