21
Last seen 2 days ago
Member for 5 years, 3 months, 28 days
Difficulty Advanced
Great! But how does _join()_ manage to insert needed spase quantity? The question is about the case
backward_string_by_word('hello world')
More
Great solution!
Inner list to save the original order, dictionary to avoid repeating words.
Thanks!
More
Very interesting approach - the real alternative to the brute force double loop
More
Thanks for **saklar13**, **metallidog** and **veky** for solution and improvements!
More
You have a lot things to optimize here:
1) **range(0, len(textList))** ~ **range(len(textList))**
2) you mix **while** and **for** loop ways
3) you don't really need to manual loop managing and should use construction like:
_for i_text in text_list:_
More
Thanks for your solution, but in fact you don't really need to dissect all the date and don't need to keep a day as a datetime.day.
It's enough to aggregate data by first ten symbols substring.
More
Some improvements could be done:
1) split instead of slicing
2) mod operation (%) instead of if else construction for h
3) min(alpha, 360 - alpha) instead of if else construction for return
More
Nothing to add: functional, minimized while still readable
More
Clear, thanks!
One mention: you can use _text.split(begin)[-1]_ instead of block:
_if pos_begin != -1: text = text.split(begin)[1]_
P.S. I've learned it from this mission :)
More