vendredi 10 juin 2016

Why use "if str[:] == str[::-1]" can check if str is palindrome? [duplicate]

This question already has an answer here:

I just can not understand how this concise statement if str[:] == str[::-1] works in Python. Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire