Jan. 17, 2020, 10:40 p.m. |
+ 1 |
for Comment
Leonix: Whoa, I finally solved it. This clearly felt like one of the harder tasks, not _Elementary_ :D
|
Dec. 9, 2019, 3:10 p.m. |
+ 1 |
for Comment
veky: Now I have `\2` problems. ;-D
|
Aug. 8, 2016, 6:17 p.m. |
+ 1 |
for Comment
han97: Use * instead of indexing
|
June 9, 2016, 10:04 p.m. |
+ 1 |
for Comment
El-Kurto: True. There is no requirement that it be a one-liner answer but, if that's the constraint you are op...
|
Jan. 18, 2015, 12:08 a.m. |
+ 1 |
for Comment
veky: ... if array ... is much better than ... if len(array). If you really want to use len(array), you ca...
|
Jan. 18, 2015, 12:07 a.m. |
+ 1 |
for Comment
veky: I think set(blah) & set(nyeh) is still nicer than set(blah).intersection(nyeh). But not much.
|
Jan. 18, 2015, 12:07 a.m. |
+ 1 |
for Comment
veky: Obvious. :-) Now count zeros. ;-)
|
Jan. 18, 2015, 12:04 a.m. |
+ 1 |
for Comment
veky: Decorate-Sort-Undecorate is sooo last century. :-P The most ironic is that you _do_ use key. :-D
|
Jan. 18, 2015, 12:03 a.m. |
+ 1 |
for Comment
veky: Nice. Of course, can be expressed with any. any(word.endswith(suffix) for suffix in words_set for wo...
|
Jan. 18, 2015, 12:01 a.m. |
+ 1 |
for Comment
veky: Why line 6? Tuple has all the interface you need. Nice algo, of course it can be expressed with sum....
|
Jan. 18, 2015, midnight |
+ 1 |
for Comment
veky: Why [0]? There is no char in Python, just str of len 1. Just as there is no "digit", just a single-d...
|
Jan. 17, 2015, 11:58 p.m. |
+ 1 |
for Comment
veky: Instead of lambda with \*, you can use `operator.mul`. Or if you don't want to import one module mor...
|
Jan. 17, 2015, 11:57 p.m. |
+ 1 |
for Comment
veky: Obvious. :-) But see EAFP.
|
Jan. 17, 2015, 11:54 p.m. |
+ 1 |
for Comment
veky: Instead of re.match with `.*`, use re.search. It's there for exactly that purpose. ;-) For the patte...
|
Jan. 17, 2015, 11:52 p.m. |
+ 1 |
for Comment
veky: Cool. :-) In modern Pythons, you can use max(...,default=0) (and min).
|
Jan. 17, 2015, 11:51 p.m. |
+ 1 |
for Comment
veky: Line 6: `if number % 5 == number % 3 == 0`
|
Jan. 17, 2015, 11:51 p.m. |
+ 1 |
for Comment
veky: Lines 4~6: `islower = isupper = isnumeric = False` Lines 16~19: `return isnumeric and isupper and is...
|
Jan. 17, 2015, 11:49 p.m. |
+ 1 |
for Comment
veky: First, really too many cases. Second, "if blah != 0" and "if blah > 0"... could really be just "if b...
|