April 3, 2018, 1:07 p.m. |
+ 1 |
for Comment
joshiji: Seeing others code makes me feel why I could never think of such usages. Awesome use of any and list...
|
Dec. 7, 2017, 11:39 a.m. |
+ 1 |
for Comment
bootoffav: Good solution, however, I would replace this pattern '+[.!-]*' with more broadly covered string.punc...
|
Aug. 16, 2017, 9:52 a.m. |
+ 1 |
for Comment
IcaroIA: Nice, I went with strftime it causes some issues, your solution simplifies using a single module, we...
|
May 18, 2017, 4:32 p.m. |
+ 1 |
for Comment
suic: This is so funny :) 1. "all the magic" (including `itertools.groupby`) on one-line. 2. wrapped by a ...
|
May 18, 2017, 4:09 p.m. |
+ 1 |
for Comment
Wienands: With the help of narimiran, who showed me what a set is and how tuple unpacking works.
|
May 6, 2017, 4:54 p.m. |
+ 1 |
for Comment
suic: Hi, as `any` returns a `bool`: return any(search(reg, subj) for reg in stress_regs) Regards, suic
|
May 6, 2017, 3:16 p.m. |
+ 1 |
for Comment
suic: Hi, two comments: 1. You could "precompile" the regexes and used the compiled version in `re.search`...
|
April 26, 2017, 3:14 p.m. |
+ 1 |
for Comment
Tinus_Trotyl: In contrast to the list.sort() method, the sorted() function accepts any iterable, so you didn't nee...
|
April 26, 2017, 7:26 a.m. |
+ 1 |
for Comment
siebenschlaefer: FYI: Instead of manually listing all permutations of ``[0, 1, 2]`` you could use the ``itertools`` m...
|
April 22, 2017, 7:17 p.m. |
+ 1 |
for Comment
blabaster: if n1 == 0 or n2 == 0: return n1 + n2
|
April 22, 2017, 7:16 p.m. |
+ 1 |
for Comment
blabaster: >>> False == 0 True >>> True == 1 True so line№16 looks excessive
|
Dec. 29, 2016, 4:30 p.m. |
+ 1 |
for Comment
siebenschlaefer: I see that you are using prime divisors exclusively. You might want to consider using other divisors...
|
Dec. 9, 2016, 7:59 p.m. |
+ 1 |
for Comment
veky: Special cases are not special. Just delete lines 2~4. :-)
|
Dec. 9, 2016, 7:59 p.m. |
+ 1 |
for Comment
veky: You're aware that you didn't have to subtract that 96, right? :-)
|
Oct. 5, 2016, 6:03 p.m. |
+ 1 |
for Comment
nash8114: You compare sets of length four with with a set of only the first value. Nice to learn that Python h...
|
Aug. 9, 2016, 8:05 p.m. |
+ 1 |
for Comment
han97: instead of "98765432", better write range(9, 1, -1)
|
May 18, 2016, 2:13 p.m. |
+ 1 |
for Comment
DahliaSR: line 4: for let in list(text) why are you casting 'text' to a list? Strings are iterable! line 5: a....
|
May 18, 2016, 2:11 p.m. |
+ 1 |
for Comment
Flying_Eye: You can get the last element like this: `array[-1]`. And sum of all elements in a `container` can be...
|
April 30, 2016, 8:29 a.m. |
+ 1 |
for Comment
siebenschlaefer: Since you filed your solution under "clear": You could avoid some repetition by rewriting ``go``: ``...
|
April 29, 2016, 2:45 p.m. |
+ 1 |
for Comment
gyahun_dash: About line 9-12, if price//coin + length < shortest: return price // coin + length else: return shor...
|
April 25, 2016, 11:10 a.m. |
+ 1 |
for Comment
vikulin: **or gifts == number** part is useless, because this is definitely not the best gift anyway and this...
|
April 19, 2016, 1:59 p.m. |
+ 1 |
for Comment
siebenschlaefer: Since you filed your solution as "Clean": - You could use more expressive variable names, e.g. `line...
|
April 19, 2016, 12:52 p.m. |
+ 1 |
for Comment
jad2192: Very similar to my own expansion by minors solution. Just a quick note about the recursion: the 2x2 ...
|
April 11, 2016, 6:55 a.m. |
+ 1 |
for Comment
suic: Hi, you can omit if r else "" as "".join([]) is "". :)
|
April 8, 2016, 8:05 p.m. |
+ 1 |
for Comment
bryanandrade: return pie.numerator, pie.denominator
|
Feb. 17, 2016, 11:01 a.m. |
+ 1 |
for Comment
nickie: `[^ aeiouy]` would do just as good as `[bcdfghjklmnpqrstvwxz]` here.
|