So, this one more about mathematics not coding :) Lol
doesn't work for uppercase.
It is a pity the instructions encourage the use of single character variable names like 's'. Although allowed by PEP8 it is not good practice. https://realpython.com/python-pep8/#how-to-choose-names
LOL! It look like cheat =))
so nice haha
I just learned a new thing :)
So, my solution fell within the realm of O(n). I actually never new that this was a thing. I should have spent the extra few seconds to google some more information rather then fall back to what I knew in my head. I guess there is some refactoring that can always be done.
Thanks for the clever and quick solution!
bad practice to reassign arguments
Indexing of array starts from 0, which means that an array of, say, 5 elements have an index from 0 to 4. But in the solution they used len() which starts from base of 1. So by using -1, the range of index will not be out of range.
very nice solution.however cold you please explain what does -1 at the end of list comprehension does?
THANKS!! I used it in problems, but didn't know how it fully worked!
There's always that guy, that writes the whole code in 1 regexp line
but what if 2.4?