Categories: Python Program

Python Palindrome | Easier now

Python palindrome using which we can find out whether the given string matches the reversed way of string.

For example :

madam = madam (reversed)

Enter the string

string = input("Enter a string: ")

reverse the string

reverse = string[::-1]

If the string matches then this block get’s executed.

if string == reverse:
    print("The string is a palindrome")

else

else:
    print("The string is not a palindrome")

string = input("Enter a string: ")
reverse = string[::-1]

if string == reverse:
    print("The string is a palindrome")
else:
    print("The string is not a palindrome")
Abhishek

Share
Published by
Abhishek

Recent Posts

5G and 6G Technology Advancements: The Future of Connectivity

5G and 6G Technology AdvancementsWhat is 5G, and How Has It Transformed Connectivity?1. Understanding 5G…

3 days ago

HTML: The Evolution and Power of Unleashed Web Language and Modern too

IntroductionInitial StagesEvolutionChallenging Other LanguagesCurrent TrendsAI and HTMLConclusion Introduction HTML, or HyperText Markup Language, is the…

3 months ago

Increase in 80C in Budget 2024 ?

Increase in 80CDemands and Discussions: Increase in 80C Section 80C of the Income Tax Act…

4 months ago

ChatGPT 4o Unleashing the Power of GPT A Comprehensive Guide

IntroductionWhat is ChatGPT-4?Key Features of ChatGPT-4Enhanced Natural Language UnderstandingImproved Response GenerationVersatilityApplications of ChatGPT-4Customer SupportContent CreationEducational…

6 months ago

APJ Abdul Kalam Biography: A Tribute to India’s Powerful Missile Man

APJ Abdul Kalam Biography :Childhood :Academics :Professional Career :Achievements : APJ Abdul Kalam Biography :…

9 months ago

Srinivasa Ramanujan Biography: Exploring the Genius

We value your feedback! Please share your thoughts on this blog on Srinivasa Ramanujan Biography…

9 months ago

This website uses cookies.