April 30, 2015, 3:55 p.m. |
+ 1 |
for Comment
Sim0000: I try your code. I found a problem your code fail. The correct answer is 3, but your code returns 4....
|
April 30, 2015, 12:34 p.m. |
+ 1 |
for Comment
Jemmity: Nicely done - I knew I should be able to do something like that lambda. I'll try to remember for nex...
|
April 30, 2015, 12:32 p.m. |
+ 1 |
for Comment
tommycarstensen: @arma Thanks for replying. I think you got the right answer for the wrong reason. I'm still looking ...
|
April 27, 2015, 5:22 p.m. |
+ 1 |
for Comment
tommycarstensen: This should be under speedy, no? Did you think of the algorithm yourself? If not, can you post a ref...
|
April 7, 2015, 1:17 p.m. |
+ 1 |
for Comment
Kaan: I found your is_alternating function very clear to read. I like that the list comprehensions are cle...
|
April 7, 2015, 1:15 p.m. |
+ 1 |
for Comment
aureooms: Instead of the `if` branch, you could use counter += number & 1 You can also remove the parentheses ...
|
April 3, 2015, 3:20 p.m. |
+ 1 |
for Comment
Cjkjvfnby: http://www.checkio.org/forum/post/1618/proper-way-to-check-if-sequence-is-empty/
|
March 25, 2015, 8:03 p.m. |
+ 1 |
for Comment
xtofl: Quite clear and very pragmatic, to say the least. Using a string representation for the combos makes...
|
March 24, 2015, 3:56 p.m. |
+ 1 |
for Comment
virajh: You can optimize this by iterating over data once instead of thrice.
|
March 9, 2015, 5:57 p.m. |
+ 1 |
for Comment
suic: Hi, why try...except? You can easily handle it by _if_ or _and_. E. g.: if array: ... else: return 0
|
March 9, 2015, 5:42 p.m. |
+ 1 |
for Comment
suic: Hi, you can shorten it using _any()_: return any(a.endswith(b) for a, b in permutations(words_set, 2...
|
March 9, 2015, 2:37 p.m. |
+ 1 |
for Comment
maurice.makaay: -1 for posting this under Clear.
|
March 8, 2015, 3:39 p.m. |
+ 1 |
for Comment
suic: Hi, with operator.mul it's more universal, but you can write it also this way: return reduce(int.__m...
|