...

/

Puzzle 28: Explanation

Puzzle 28: Explanation

Let’s figure out how slicing works in Python.

We'll cover the following...

Try it yourself

Try executing the code below to verify the results:

Press + to interact
pali = 'Was it a cat I saw?'
print(pali[::-1])

“Was it a cat I saw?” is a palindrome. A palindrome ...

Access this course and 1400+ top-rated courses and projects.