#python
some_string[-5:] vs some_string.last(5)
The first is bull$#!+ showoffery, the second is immediately obvious.
The first is for interview questions.
The second would actually be readable. And doesn't look like there is any way to fix it with monkey-patching.
Post
March 27, 2020