#python

Publié le: 18 février 2022
sur la chaîne: Code Analysis
193
15

Python Program to Check Whether a String is Palindrome or Not.
In this program. you'll learn to check whether a string is palindrome or Not.

Note: To test the program, change the value of my_str in the program.

In this program, we have taken a string stored in my_str.

Using the method casefold() we make it suitable for caseless comparisons. Basically, this method returns a lowercased version of the string.

We reverse the string using the built-in function reversed(). Since this function returns a reversed object, we use the list() function to convert them into a list before comparing.

#shorts #coding #python
#programming #python_coding


Sur cette page du site, vous pouvez voir la vidéo en ligne #python durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Code Analysis 18 février 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 193 fois et il a aimé 15 téléspectateurs. Bon visionnage!