Categories
October Surprise 2024

What does this mean: s [::-1] == s ? : r/learnpython – Reddit

So s [::-1] is a fast way to reverse a string in-line, and s == s [::-1] returns True if s is equal to its reversed counterpart.