This one looks both, clever and clean.
Comprehensions are one of the best things Python has to offer.
Writing clean code is more important than writing clever code.
Why must you slice? Lol
Saw code in my IDE decided to restructure it..
Although, this may be clever by producing the end result in only 1 line. From a readability view point, it doesn't show how the initial problem was solved.
It took me a long time to figure this out. It was clever of the creator only putting in the first two prompts/tests, then skipping to much larger numbers. When I added a few more of my own the pattern of the answer became much more obvious.
Incase anyone's wondering, cmp is a Python 2 function not Python 3.
you are not alone
SELECT TOP(5) in MSSQL is pretty straightforward, I like this syntax the most among all databases.
This means exactly: "When multiple hashtag occurrences are found, delete only the first." ;)
what the hell
I feel very stupid after seeing this solution loxl
ups, you're right! Thanks for telling me. I will not commit the same mistake again.