21
Last seen 1 hour ago
Member for 4 years, 9 months, 26 days
Difficulty Normal
I don't think you need the .lower() since .title() will change the cases anyway, but it's a simple 1 line code, so nice work!
More
This is interesting! So you split it by name= then take the second half (which should have the key) and then split it again by '; ' and take just the first part to remove anything that might come after the key! Cool!
More
Oh! the (7 - d.weekday()) is a clever way to solve the math for adding days to get past the weekend! I just solved it with if statements. Nice!
More
The way you grab the data for each building and number them enumerate(zip(*buildings)) is very clever. Overall a really great job!
I also really appreciate the way you added the rest of the asserts and formatted them so it was easier to see which building is tallest!
More
This took me quite a while to understand. All I could read was "setting" everywhere. Would it still have worked if you had used a different variable name for the "settings" within the return statement? Like if you had used:
item[1 + item.index('='):] for item in cookie.split('; ') if issetting(
More
Oooh! I like this one! I saw one similar, but they replaced ALL the '.' instead of one.
More
Making this look easy! Short and to the point! I didn't know about istitle(), so thanks for that!
More
Oooh! This is an interesting use of re! It's actually easier for me to understand than the example they provided, though it probably was a pain to type out. Still very creative!!
More
The way you account for blank lines is very interesting! Range(1,0) would just be null, so it won't go through that loop, and then bool(line) would return False (which is also 0 in python) * m which would be 1 by default or still 0. If it's true, 1 * max value is max value. I just think this is ver
More
I really don't know how you figured out that math, but the resulting function is pretty simple and easy to understand, even if I don't understand how you got there. Great work! I guess I need to brush up on some math!
More
Man it took me a hot minute to understand this one. So basically you discard lists until you get to a list with at least one 1, then you find the index of that 1 (because that's the tallest building), and return the number of lists because that's the height!
I understand it now, but I never would
More
This didn't break on the "3e4" assert? I kept having that problem. It kept saying 3e4 was True instead of False.
More
Man, I used the same logic, but you managed to put it into one line! Nice work!
More
Whenever I see your code, I end up learning about something new. Today's lesson was reading up on frozenset. Great work as always
More
This is a pretty creative way of looking at this! It took me a bit to understand the logic though. The recursive function drills down through until the data is just 2 numbers, then adds to it from there, right? I'll admit, the data[1:] threw me off for a minute, like "how does it compare data[0]?"
More
The fact that you can come up with your own regex means you're way ahead of me! I usually have to google it, copy it, and then reverse engineer it X-D Nice work!
More
The only problem I see is that a value like 1.5.5.33 would be turned into 15533 by the val.replace, and it would then be considered a digit, even though it's not really a number. None of the asserts check for that though, so it works. It is beautifully simple and easy to understand!
If you wanted
More
Wow! A one-liner! It was a little harder for me to understand at first, but your explanation in the comments was very helpful! Nicely done!
More