17
pandektis
3 18 33
1555/ 1695
Last seen 15 days ago
Member for 3 years, 4 months, 17 days
Difficulty Normal
Best reviews / Newest reviews
1-liner-Stensen 1
Perhaps you could skip the whole part after the if? is_majority = lambda i: i.count(True)>i.count(False) I think just this would suffice, no need to compare twice. More
4 lines, regular expression safe us :-)-kdim 1 1
Good job. Are you missing the '+' at the end of 'asap' and 'urgent' on purpose? You 've put one on the help. (Actually, it doesn't matter, because one letter at the end still completes the word and validates... just asking why one and not the others) More
First-mortonfox 1
I had the same idea, but I didn't know how to write it so concisely. I learned something, thanks More
2x for, 1x if-petrlos 1
Very clean and compact, returns early on first hit. Good job More
First-l.szyman10 1 1
Well I had the same idea, sorting and emptying the set, to minimize loop rounds. I like this for not creating an extra list (I used sorted()) and the while , pop() are more clear. Why not use str.endswith() in the conditional? More
one string-kdim 1 1
I solved it like that, I see I could have skipped the '0' at array[0::2] More
First-pandektis 1
Thanks. Searched a little to come up with it, not quite fluent yet More
First-Josef_Mares 1 1
The bin() function returns a string, does it not? More
No len()-LewisFogden 1
To add to what @attilagerendi said, sometimes is conceptually more correct: I, as a function, have this job to do (Find Nth power of the element with index N, as this mission asks). So if I get the wrong parameters, it's an error, not a decision I have to make. (Kind of nitpicking here, but thought More
Correct Sentence-Lionheartd
I think is more correct to use text[0].upper() not text[0].capitalize() More
First-kunkka71 1
You could skip the reverse=True and the minus in -e by putting a minus in front of numbers.count(e), like this key=lambda e: (-numbers.count(e), e)) More
not using re-spark856
Clever one, skips the same-word check. I did something similar, by emptying the set with each iteration. More
First-boxdima1
Nice solution. Just a minor thing, I would put the conditions like this: "first in word and word.find(first) == word.find(second) - 1" If not in word, I 'm done with it, no more comparisons More
Even_the_last_with_some_polish-arkadiusz.nadolski
good job. Perhaps in the multiplication you could use array[-1] instead of array[len(array)-1] Also, why use while n <= len(array)-1: the same result, and a little cleaner I think while n < len(array): More
comprehension-s.kopytov
My first thought exactly, the enumerate. More
First-xiaoxiannv-TangTang
Exactly the same as mine! Nice! More
First-DavidVargas
Nice attempt, and I see it is working. Perhaps you should go easy on the comments a bit, don't need to comment # imcrements index 1 index += 1 I 'm just learning myself, but I must tell you that your code feels like C. I can't give you some solid proposals or exact ways to write More
Regular Expressions (RegEX) - RE module-TrB 1
Nice! Pretty clear logic and implementation Guess I have to study re a little more More
My Right to Left not using Raplace-Zali
You 're in for much more trouble than is needed.. Why are you replacing "left" with "right"? It isn't asked. You 're checking three times the same thing (ok with a variation, if it is at the end) if "right" in list_phr[i]: if list_phr[i].endswith("right"): n More
1
2