Sept. 30, 2016, 7:01 a.m. |
+ 1 |
for Comment
BoguslawKalka: Some optimization could be done: check if newly found palindrom (lines 6-7) is longer than longest a...
|
Feb. 8, 2016, 9:14 a.m. |
+ 1 |
for Comment
qzane: U can simply use "sorted(*args, key=key, reverse=True)[0]" in max function
|
Nov. 5, 2015, 7:22 a.m. |
+ 1 |
for Comment
Happiness: Visual Studio + Python Tools ¯\\\_(ツ)_/¯
|
Oct. 5, 2015, 7:48 a.m. |
+ 1 |
for Comment
alexey_sychev: OK, you're right. In this example, this is appropriate.
|
Sept. 2, 2015, 1:19 p.m. |
+ 1 |
for Comment
PyPoet: Same as mine. Makes sense... apparently.
|
Aug. 21, 2015, 10:51 a.m. |
+ 1 |
for Comment
aslanseyes: Nice job on that third list comprehension. :)
|
Aug. 17, 2015, 11:04 a.m. |
+ 1 |
for Comment
AMJ: it's good idea to use a func! and very creative!
|
Aug. 13, 2015, 8:50 a.m. |
+ 1 |
for Comment
soferio: Instead of using int, could just using flooring division "//". Also, could just calculate len once a...
|
July 24, 2015, 8:56 a.m. |
+ 1 |
for Comment
David_de_Rivaz: I like the (-checksum%10) instead of using a special case for 0.
|
July 22, 2015, 9:04 a.m. |
+ 1 |
for Comment
cle99y: very nice !!
|
July 2, 2015, 10:52 a.m. |
+ 1 |
for Comment
militant-daos: Nice solution! But just one hint: each of any(map(...)) calls may be replaced with a little cheaper ...
|
July 2, 2015, 10:30 a.m. |
+ 1 |
for Comment
nlaurance: except everything!
|
June 29, 2015, 9:44 a.m. |
+ 1 |
for Comment
Funkentanz: Why not c += 1 ?
|
June 17, 2015, 7:24 a.m. |
+ 1 |
for Comment
maurice.makaay: Why not in two?
|
June 10, 2015, 11:09 a.m. |
+ 1 |
for Comment
Cjkjvfnby: http://www.checkio.org/forum/post/1618/proper-way-to-check-if-sequence-is-empty/ you can use str.sta...
|
May 18, 2015, 7:51 p.m. |
+ 1 |
for Comment
tdietert: So brilliantly brilliant... I spent 4 hours on this challenge and wrote 100+ lines of code attemptin...
|
May 13, 2015, 6:55 a.m. |
+ 1 |
for Comment
veky: First snippet: variable names, of course. But Python frowns on that usage of indentation. This is no...
|
May 12, 2015, 12:34 p.m. |
+ 1 |
for Comment
EduRod: Whats a bicycle function
|
May 12, 2015, 11:38 a.m. |
+ 1 |
for Comment
veky: Not magic, just illusionism, as I like to say. :-) Write code, see what's repeated, factor it out; w...
|
May 12, 2015, 11:18 a.m. |
+ 1 |
for Comment
veky: That doesn't make as much sense as you probably think. If the password is short, then the checks wil...
|
May 12, 2015, 9:51 a.m. |
+ 1 |
for Comment
metabuddy: this is brilliant I wish I had your brains
|
May 12, 2015, 8:39 a.m. |
+ 1 |
for Comment
oduvan: And I believe in the creative section you will get more points for your idea :)
|
May 12, 2015, 8:39 a.m. |
+ 1 |
for Comment
oduvan: If I get this code for a production solution, I would ask to refactor it.
|
May 12, 2015, 8:38 a.m. |
+ 1 |
for Comment
LostxinthexMusic: Why make it a lambda?
|
May 12, 2015, 8:35 a.m. |
+ 1 |
for Comment
LostxinthexMusic: It's rather hard to misunderstand this bit of PEP8: > Always use a def statement instead of an assig...
|
May 11, 2015, 3:57 p.m. |
+ 1 |
for Comment
melpon: Thank you! "lambda" is very convenient when writing short code.
|
May 11, 2015, 3:56 p.m. |
+ 1 |
for Comment
contrebasse: if l % 2 == 1: For clarity, I would keep the ==1 here (or rather have !=0 actually).
|
May 10, 2015, 11:10 a.m. |
+ 1 |
for Comment
veky: The most amazing thing is that someone dared to consider it _too long_. :-DD
|
May 10, 2015, 11:10 a.m. |
+ 1 |
for Comment
veky: What? :-) It's a list comprehension. Just read it, you'll probably understand. :-)
|
May 10, 2015, 11:09 a.m. |
+ 1 |
for Comment
abesto: Are you sure this is O(n)? d.count(x) counts the number of times x occurs in d for each element of d...
|
May 10, 2015, 11:07 a.m. |
+ 1 |
for Comment
nickie: If you go a few more questions along this road, what is Python?
|
May 10, 2015, 11:04 a.m. |
+ 1 |
for Comment
deadbeef: I see no difference, top-1 and top-2 solutions are completely same.
|
May 8, 2015, 3 p.m. |
+ 1 |
for Comment
Alexandr_Svirbutovich: Thanks for this solution. Many useful things I have learned.
|
May 8, 2015, 11:02 a.m. |
+ 1 |
for Comment
gyahun_dash: I used [Format String](https://docs.python.org/3/library/string.html#format-examples). 0 in {} means...
|
May 8, 2015, 10:57 a.m. |
+ 1 |
for Comment
DiZ: Kudos for documentation!
|
May 8, 2015, 10:27 a.m. |
+ 1 |
for Comment
Cjkjvfnby: It is best way to do it both in execution speed and readability.
|
May 8, 2015, 10:27 a.m. |
+ 1 |
for Comment
artemrudenko: Magic is always around us
|
May 8, 2015, 10:26 a.m. |
+ 1 |
for Comment
Cjkjvfnby: Simple is better than complex.
|
May 8, 2015, 10:26 a.m. |
+ 1 |
for Comment
Amachua: Python 3.x way :) P.S. Why use tuple here? It works fine without it :)
|
May 8, 2015, 10:21 a.m. |
+ 1 |
for Comment
bryukh: Simple and accurate.
|
May 8, 2015, 10:20 a.m. |
+ 1 |
for Comment
Cjkjvfnby: **set(...) & set(...)** has same effect as **set(...).intersection([...])** converting list to set i...
|
May 8, 2015, 9:55 a.m. |
+ 1 |
for Comment
codeM0nk3y: This may be a *brilliant* solution, but it is not clear in the least.
|
May 8, 2015, 9:55 a.m. |
+ 1 |
for Comment
kamikaze: nice. but while you are trying to reduce line count you are violation PEP-8 and readability :)
|
May 8, 2015, 9:54 a.m. |
+ 1 |
for Comment
Cjkjvfnby: Exact as I expect.
|
May 8, 2015, 9:15 a.m. |
+ 1 |
for Comment
veky: Nice idea, but please watch the video "stop writing classes". ;-]
|
May 8, 2015, 9:13 a.m. |
+ 1 |
for Comment
ArchTauruS: real love needs no reason, hehe
|
May 8, 2015, 8:51 a.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...
|
May 8, 2015, 8:51 a.m. |
+ 1 |
for Comment
monica: Thanks for commenting my solutions. I just started learning Python the other day and your posts are ...
|
May 8, 2015, 8:50 a.m. |
+ 1 |
for Comment
gatogordo: bin() already returns a string. The str() is not needed. Other than that, we did the same thing. :D
|
May 8, 2015, 8:41 a.m. |
+ 1 |
for Comment
dagger126: This can rewrite set(a) <= set(b)
|
May 7, 2015, 3:09 p.m. |
+ 1 |
for Comment
arma: Very original recursion solution. This technique is described here: [Extended Iterable Unpacking](ht...
|
May 7, 2015, 2:47 p.m. |
+ 1 |
for Comment
Cjkjvfnby: You can use bool as int. # if x > y: count += 1 count += x > y
|
May 7, 2015, 1:46 p.m. |
+ 1 |
for Comment
Cjkjvfnby: Making own implementation for standard library functions is not clear. Using standard library functi...
|
May 5, 2015, 3:36 p.m. |
+ 1 |
for Comment
Cjkjvfnby: This is english speaking forum, please use english. Code style make code more readable. I leave comm...
|
May 5, 2015, 3:36 p.m. |
+ 1 |
for Comment
Cjkjvfnby: Some notes about style: no need parenthesis and you miss space after coma return ",".join(phrases).r...
|
May 5, 2015, 3:35 p.m. |
+ 1 |
for Comment
tarikki: Haha it's so simple with replace()! Man all those for loops were a pain in my solution :P
|
May 1, 2015, 10:43 a.m. |
+ 1 |
for Comment
Cjkjvfnby: Set -1 because **len(array) == 0** PEP8: For sequences, (strings, lists, tuples), use the fact that ...
|