About 38,100 results
Open links in new tab
  1. python - How to check if a string is a palindrome? - Stack Overflow

    print("string is not a palindrome") If a word is inputted, for example : rotor , I want the program to check whether this word is palindrome and give output as "The given word is a palindrome".

  2. Recursive Function palindrome in Python - Stack Overflow

    3 If a string is zero or one letters long, it's a palindrome. If a string has the first and last letters the same, and the remaining letters (I think it's a [1: -1] slice in Python, but my Python is a bit …

  3. Checking for a palindrome, using for-loop in Python and print …

    Oct 30, 2022 · Checking for a palindrome, using for-loop in Python and print output ONLY ONCE Asked 3 years ago Modified 4 months ago Viewed 25k times

  4. How to check for palindrome using Python logic - Stack Overflow

    Jun 27, 2013 · You are asking palindrome in python. palindrome can be performed on strings, numbers and lists. However, I just posted a simple code to check palindrome of a string.

  5. python - Checking Palindrome text, with ignored punctuation …

    Jun 1, 2015 · Homework exercise: Checking whether a text is a palindrome should also ignore punctuation, spaces and case. For example, "Rise to vote, sir." is also a palindrome but our …

  6. Python reverse() for palindromes - Stack Overflow

    Dec 19, 2016 · 6 I'm just getting started in python, and I'm trying to test a user-entered string as a palindrome. My code is: x=input('Please insert a word') y=reversed(x) if x==y: print('Is a …

  7. Python palindrome program w/o string functions - Stack Overflow

    Dec 27, 2014 · I'm a beginner in Python. I've written palindrome programs without using string functions. Question 1: Why does the 1st logic not give me the desired output? Correct me if …

  8. Most efficient palindrome program for python - Stack Overflow

    Jul 18, 2015 · I would like to know for a python code which identifies palindrome and non-palindrome. What is the most efficient way to do this? could you please show the code you …

  9. python - How to check for palindrome, ignoring special characters …

    Jan 24, 2022 · print(is_palindrome(input('Enter the value: '))) How can I improve my code, making it ignore case, spaces, and special characters, to identify the above palindrome and give the …

  10. Using Python, reverse an integer, and tell if palindrome

    Oct 25, 2012 · Using Python, reverse an integer, and tell if palindrome Asked 12 years, 10 months ago Modified 3 years, 5 months ago Viewed 101k times