17
Kostiantyn Tkachuk
Last seen 1 year ago
Member for 3 years, 1 month
Difficulty Normal
It is beautiful solution! I spent sometime learning new python features as well as logical operators peculiarities. When then idea and process became clear, I felt quite nice felling. Thanks for sharing your art.
More
Thanks. I learnt the possible syntax for extracting appropriate values from the for-cycle with condition.
More
Cool! Once again I did not recollect '0 and value' :)) Thanks for remanding.
More
Cool! Thanks for sharing! I learn new for me in comparison.
More
Good idea to search just for the first letter and calculating the index of the last.
More
I thought my solution is good. After seeing your solution, it appeared that mine just .....ok - possible option.
Cool solution! Thanks a lot - I learnt something! Definitely, I will try this approach next time.
More
Thanks for reminding. I am waiting for the the time, when I recollect by myself. :))
More
:)))))
Point 1. The first, third, fifth.... datetime objects are times when bulb was turned on.
So,
for it, on in enumerate(els[::2])
simply iterates through all times when bulb was turned on
Point 2. A time period, when bulb was turned on is difference between two time objects (time_off -
More
Cool. :)))) Thanks! I will use it
am_or_pm = ['a.m.', 'p.m.'][hours >= 12]
More