15
MackM
2 9 24
978/ 1195
Last seen 9 years ago
Member for 9 years, 11 months, 9 days
Difficulty Normal
Best reviews / Newest reviews
Triangle Wave-gyahun_dash 1
Excellent code, and excellent explanation. Thank you for taking the time to share. More
symetries-toufalk
Good comments, I (think I) understand how this was done :-). More
monkey-typing --> s7even-s7even 1
I hadn't thought of putting an int in the list instead of the word itself, thank you for the education :-) More
First-MackM 1
I misunderstood the task. line #3 is Unnecessary and also makes my function break on inputs such as count_words("AB CAB",{'abc'}) More
First-the0d
Hello, If you wanted, lines 15 and 16 could be rewritten as just return False which I find to be more clear. Up to you though :-). It is an interesting idea to keep a running count of how many more brackets have been opened than closed as well as a stack, but I think it is not neede More
First-Tsutomu-KKE
A very concise and readable solution, I like it. More
First-contrebasse
Nice comments, very clear code :-) More
_-blaxmi
I wouldn't have thought to lookup digit values like that, nice one. More
via recurssion-pax0r
Very cool solution. If you wanted to be a little more concise, you don't need to pass the current total (curr) down the recursive chain and then back up, you can get away with passing the running total back up only. For instance, def partial(data): if data: return dat More
Second. Simplified realisation-vinc 1
I hadn't realized you could alter a list with .extend() while iterating through it with a for loop, that's good to know. Thank you. More
First-magdre 1
If you want to be a little more concise, you can unpack the date arguments directly into the datetime function with a '*'. datetime.datetime(*d1) == datetime.datetime(d1[0],d1[1],d1[2]) More
TrueUntilProvenFalse-GregorySoter
Just out of curiosity, is there any reason to use while loops instead of for loops? More
First-hidekih
More descriptive variable names for 't, h, d' would be helpful. More
Indexcept-veky 2
Is there an advantage to using a try/except block instead of checking the array length? More
Almost One Line-maket
Is there any particular reason you squished everything into one return statement? More
First-zaroth
This is completely functional, but just a note, dictionaries can become fairly inefficient as their size grows. More
First-Nik05
Out of curiosity, any reason to smush it all into one line like that? More
Quick and dirty-martinbetz 1
I'm not a fan of the 7-deep nested blocks, and re-iterating over every character so many times. More
First-ypsun
Very clear and easy to understand. More
First-Slepice1
Very similar to my approach, so it must be excellent ;-) More
1 2
3