17
Awesome Team
Michael Schneider
Last seen 1 hour ago
Member for 5 years, 10 months, 3 days
Difficulty Normal
Chemist and part time software tool developer.
As a teenager, did Basic and Assembler on C64.
These days, I use Python (Django, Matplotlib, ...) for most things but have dabbled a little in Javascript and C# when needed.
Had to look up np.where, since I am not terribly familiar with numpy. Always good to learn something new.
More
I wouldn't recommend a blanket expect without specifying an error class. In this case it would be expect ValueError. Although this is the only error I can think of here, blanket except might hide errors you never thought of when writing more complex code.
Also, I would probably use a different var
More
Does this still work if there is an empty row/column in the middle of the house? I seems to me you would filter it out.
More
Quite creative list comprehension use. I wouldn't use it that way, but learnt something new.
More
I first thought there was a product function similar to the sum function in the builtins when I read this. Just found out there isn't.
More
Interesting. Didn't know dropwhile. Appears to be a common thing in the functional world.
More
It does the job, although I find the comprehension in the comment below a lot more readable than the map/filter expression.
I wouldn't use i in the expression, since it is commonly used for integer counter values.
More
It works, but depends on the hours having exactly two digits. The (hours + minutes) thing looks quite creative.
More
Not sure why the list comprehension is required here. Wouldn't it be easier and more performant to just join the re.findall result?
More
Nice dict construction. I did it with chr and ord, but this is kind of more original.
More
Does this still work when two names in a team have the same first letter?
More
Hehe, this looks like mine, I just had parentheses around the if clause ;)
More