Write a function that tests whether a string is a palindrome

def palindrome_check(string):
    string = list(string)
    tmp = []
    #remove any spaces
    for x in range(0, len(string)):
        if(string[x] != " "):
            tmp.append(string[x].lower())
    
            
    #now reverse the string
    array1 = []
    i = 0
    j = len(tmp)-1

    while(i < len(tmp)):
        array1.append(tmp[j])
        i += 1
        j -= 1

    #check if array1 is equal to the string
    counter = 0
    for x in range(0, len(tmp)):
        if(tmp[x] == array1[x]):
            counter += 1

    #if the counter is equal to the length of the string then the word
    #is the same
    if(counter == len(tmp)):
        return True
    
    return False

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
function to check if a string is palindrome Write a script to check whether the given string is a palindrome Which of the following will generate palindrome string? make palindrome from string How many loops are required to check if string is palindrome or not?* palindrome string eg how to check if a number is a palindrome check 2 strings are palindrome or not given a string check if its a palindrome permutation some palindrom string is a substring in a string is palindrome Check if a string contains a palindromic substring Check if a string contains a palindromic sub-string palindrome string logic palindrome string logic i palindrome checking in substring what is palindrom string Program to find all the palindromes in the string no of palindromes in a string algorithm to find palindrome in a string Write code to check if a String is palindrome or not? algorithm to check string is palindrome or not palindrome with string parameters chech if string is palindrome c+ number of palindromes that can be formed of a given string check if number is a palindrome examples of palindrome string given the string check if there is a palindrome substring generate all palindromes of a string number of palindromes from a given string check if number is a palindrome math check given string is palindrome or not palindrome strings example check if a number is palindrome is string palindrome Write a program to check whether the given string is palindrome or not generating a string that is not palindrome or Write a program to check whether a no. is palindrome or not In least possible comparison, how to check whether a string is palindrome Write a program to find that given number or string is palindrome or not. for a given string find all substrings which are palindromes given a string find if 0-i is palindrome Program to check whether string entered is a palindrome or not. Program to check whether string entered is a palindrome or not Write a program that reads a string and checks whether it is a palindrome string or not. Palindrome - 3 You are given a string, write a program to find whether the string is palindrome or not. palindrome string solution Comparing strings and palindrome how to find all palindromes in a string how to find a palindrome in a string * @ param {string} s - String to check if it has a palindrome permutate write a program to check a given number is palindrome or not algorithm for WAP to check whether a string is palindrome or not. find palindrome substring in string program to vheck if string is palindrome is valid palindrome function A string is an almost-palindrome if by changing only one character, you can make it a palindrome. Create a function that returns True if a string is an almost-palindrome and False otherwise how many palindrome present in given string how to find palindromes of specific length in a string A string is an almost-palindrome if by changing only one character, you can make it a palindrome. Create a function that returns True if a string is an almost-palindrome and False otherwise. number of steps to make string palindrom write a program to check palindrome string Create an algorithm to check if a string is a palindrome Write a function that returns 1 if a string is a palindrome and 0 if not. A string is an almost-palindrome if by changing only one character, you can make it a palindrome. number of palindromes in a substring Write a program to check whether the given string is a palindrome or not. Write a program to find all the palindrome words in a string . is string a palidrome is string a palindrome valid palindrome string write a funnciton its take a string and return palindrom number number of substrings which can be palindrome string is palindrome given string is a palindrome Check whether the string passed to the method is a palindrome or not. Return true if the string is palindrome, else return false. Given a string, write a function to check if it is a permutation of a palindrome. Write a method to determine whether the input string is a Palindrome or not program to check whether a number is palindrome or not method to check if input String is Palindrome program to find the total number of palindrome in a given string palindrom of string All possible fake palindrome substrings (Fake palindrome- whether a string has any possibilities of palindrome) mathematical condition for a string to be palindrome condition for a string to be palindrome find a string with n palindromuc substrings how to check given number is palindrome or not palindromw string number of possible palindromes of a given string program to check whether palindrome or not how to find palindromes in string test cases for palindrome string string palindrome sarys string program to check palindrome using array Write a program to check whether a number is a palindrome or not? gfg practice find substring that is palindrome Program to check if a string is a Palindrome without using built in function. in the given string check and count palindrome string and int find all palindrome string Write program for string is palindrome or not. Write program for string is palindrome or not p check if a string is palindrome without using library function given a string make it palindrome check string palindrome algorithm palindrome in programming string How do you check if a given string is a palindrome Write the logic to check whether the given string is a palindrome or not? find the number of substrings which are palindrome palindrome string or not check if a given string is a palindrome or not Find substring palindrome how to find number of all palindrome substrings in a string write a method to check whether a string is a palindrome or not how many palindromes in a string how to check if string is palindrome prolog palindrome string possible palindrome substrings in a string write a string palindrome program. check if a string can be rearranges into a palindrome program to find a string is palindrome or not 7. Write a function which will check if a given string is palindrome or not Palindrom(String find strings to attach to make palindrome check if astring is palindrome longeest palindrome in a string Write a program to check how may palindrome strings with different lengths exists int a given palindrome string. Write a function to check whether a particular word is a palindrome or not. Write a program to check if a string entered by the user is a palindrome string or not. write a program for palindrome string check if a string can be arranged as a palindrome how to check if a string can be a palindrome or not make a string palindrome function to check if a value is palindrom check if string is a palindrome generate palindrome strings of given length make a palindromic string from a given string palindromes in a string all possible palindromes in a string no of strings before this string are palindromes find the number of palindromes below a string no. of palindrome strings find all palindromes in a string with given length check if a number is a palindrome find number of palindrome strings check if two strings are palindrome login complexity check if two strings are palindrome logn program to check palindrome string is a string with one character palindrome is string of length 1 a palindrome if a string is palindrome or not Check Palindrome String check a number is palindrome or not palindrome score of string Check Palindrome String. Palindrome Number Write a program which takes a number as an input and find out whether the number is a palindrome or not. palindrome string test palindromes string to check string is palindrome or not by iteration I wish to determine if a given string is a palindrome Write a Program to findout a string is a palindrome or not valid palindrome ii string check if string is palindrome Independently Testable Functions program to check number is palindrome or not how to test if something is a palindrome test cases for a palindrome program Write a program to check if the given input string is palindrome or not, if palindrome then reverse it. number of palindrome in a string code to check a palindrome of string string is a palindrome or not check if substring in string is a palindrome Write a script to determine whether the entered string is palindrome or not. find palindrome in string by making functions Function of palindrome in string in c++ write a function of palindrome to check string palindrome of string how to find number of palindromes in a string find palindrome in a string find palindrome within a string Program to check whether number is Palindrome or not. check string is palindrome reccursion n strings palindrome or not Find the number of substring which palindrome. even string length palindrome example How many palindromes are there in the given string. .How many palindromes are there in the given string. calculate palindrome string find all palindromes in a string function to check if a string is a palindrome or not function to check if a number is a palindrome or not find all the palindrome using character of string create palindrome from a string find all possible palindrome of a string palindrome string means palindromes formed by string finding palindromes in a string is one length string a palindrome? entered string is palindrome or not. palindrome string program n number of string palindromes Given a string, write a function that checks if the input is a valid palindrome. examples of string palindrome number of palindromes in a string what makes a string palindrome write a program to check whether a number is palindrome or not Write a program to find whether a given string is a palindrome or not. Write a program to check if a number is palindrome or not. (Use Loop). palindrome for string array of string palindrome or not write a function to find the palindrome A palindrome is a string that reads the same from the left and from the right. For example, how to check a number is palindrome or not Given a string of strings, print the number of palindromes present Write a function to find palindrome numbers. palindrome string problems program to find a string is palidrome or not check string is palindrome and return not palindrome string check number is palindrome and return not palindrome string Write a function to find the longest Palindrome in a string Check If possible to make palindrome string or not. efficient program for checking a string is palindrome or not in cpp how to find palindrome substring in a string Can you write a code that will verify if a string is a palindrome or not? Write a function that determines if a text is Palindrome test for palindrome number without a string Given a string and find the number of substring which is palindrome. palindrome substrings of string Write a function that determines if a string in a palindrome Write a function that determines if a string in a palindrome. find if a string has a palindrome input a string and determine whether it is a palindrome c++ input a string and determine whether it is a palindrome find all number palindrome substring in a string if a string is palindrome or how many characters does it require to make it a palindrome a function that determins if a string is a palindrome recursion checking a string to be palindrome in root n time Write a program to check the palindrome string. easy Write a program to check the palindrome string. number of palindrome substring of a string check palindrome function make string palindrome program to check if string is palindrome program to check string is palindrome or not is palindrome string Write a program to find the given number is palindrome or not. string palindrome program check if it is a palindrome. palindrome strings palindrome string meaning function to test if a string is a palindrome returning boolean find if given string is palindrome how to find a palindrome substring from a given string match two string for palindrome palindrome number in string edtermine whether string is a palindrome how to check if a string is a palindrome find palindrome in string How many loops are required to check if string is palindrome or not given string is palindrome program to find the possible palindrome substrinf of a given stringl check if string contains palindrome as substring Check if a Given String is Palindrome no of palindrome in given string palindrome of a string Write a program using function to find out the given string is palindrome or not. all palindromes in a string example of palindrome string check wheather string is palindrome or not the number of palindromes in the given string check a string is palindrome or not Test if a string is a palindrome code to check string is palindrome or not palindrome string example check whether a string becomes a palindrome by changing only one letter in it a palindromic string from given string change one letter of string and check if it is palindrome what is string in palindrome program to check whether string is palindrome or not &quot;to indicate if the input string is a palindrome, which means&quot; write a program that reads a string and check if the string is palindrome or not program to check given string is palindrome or not given a string find number of different substrings that are palindromes palindrome program for string 7. Check whether given string is a palindrome or not. A palindrome can be defined as &quot;a string that reads the same f a palindrome can be defined as a string check a question if it palindrome. Palindromic python planidrome python check string is palindrome or not in python check string palindrome in python Palindrome program in C | Check if string is Palindrome Palindrome program in C | Check if number or string is Palindrome | #9 Coding Bytes check if a string is palindrome python palindrome in python string Write a program to input T strings (S) from user and print 1 if it is palindrome otherwise print 0. NOTE:A string is palindrome if it reads the same from backward as from forward. to check if string is palindrome c++ how to find if a string is palindrome check if a string is palindrome c++ testing the function ispalindrome python How do you check if a given string is a palindrome python check if string is palindromic write a python program to check palindrome string palindrome what is string palindrome the word is palindrome python write a program to check if the string is palindrome in c check for a palindrome in a string in c detect palindrome in a string string is palindrome or not python code for checking palindrome of two strings Implement a class to find the reverse of a string and check if the string is a palindrome or not? for c++ check for palindrome string plandrome python explain palindrome in python check a String is palindrome what is a palindrome string is palindrome is strin g or not palindrome string check palindrome python for loop Write a program that receives a single word as input and checks to see if the word is a palindrome Write an algorithm that checks whether a given string s is a palindrome (it reads the same way backward as forwards). For i in (0..floor(|s|/2)): If s[i] != s[|s|-1-i]: Return False Return True python code for palindrome create a function that checks whether a phrase is a palindrome, palindrome using function in python and user defined function palindrome using function in python and user defined palindrome using functions in python check whether a string is palindrome or not string palindrome example write a function f that determine string is palindrome Given a string S, check if it is palindrome or not. check if a string is a palindrome or not palindrome of a string python Write a Python function to check whether a string is palindrome or not what is palindrome string how to check string is palindrome or not palindrome time complexity using slicing vs reverse vs iteratively how to check if the string is palindrome or not takes in non empty string palindrome check python check if a string is palindrome python polyndrom check string is palindrome using single for loop check if string is polindrom algo function that verifies that a word is palindrome check string is palindrome or not how to check a string is palindrome or not to check whether given string is a palindrome or not palidrome in python check if word is palindrome python Python Palindrome Program CPSC 4317 check if a string is palindrome in python python code for reversing a string and check palindrome using loop palindrome invert array text python palindrome string in python using for loop check if the string is palindrome or not python palindrome function find palindrome programming how to check if string is palindrome in python in file find if a given string is palindrome or not python checking palindrome in python how to find if a string is a palindrome or not How do you check if a given string is a palindrome? Write the logic that determines whether an input String s is a palindrome or not (a palindrome is something that reads the same left to right as it does right to left). check whether string is palindrome or not palindrome program in python using function Given the string, check if it is a palindrome. word palindrome in python potential problems in checking the reverse of a string in python python palindrome code Write a Python function that checks whether a passed integer is palindrome or not. buitin function used to generate intermediate result in python while cheking for palingdrome what inbuilt function can be used to generate in the palindromes in list in Python is string a palindrome python check if string is palindrome n=input(&quot;Enter the string:&quot;) if(n[:]==n[::-1]): print(&quot;Palindrome&quot;) else: print(&quot;Not a palindrome&quot;) n=input(&quot;Enter the string:&quot;) if(n[:]==n[::-1]): print(&quot;Palindrome&quot;) else: print(&quot;Not a palindrome&quot;) Write a function called isPalindrome that accepts a single string argument, then returns true or false depending upon whether or not the string is a palindrome. pallindrome in python to check a string is palindrome or not in python checking palindrome python how to check if a string is palindrome in python palindrome logic in python palindrome or not python palindrome for string in python palindrome checker in python string is palidrome or not python how to check whether a string is palindrome or not in python how to check whether a string is palindrome or not palindrome checker python check palindrome python palindrome solution python check paliandrom in python palindrome or not in python palindrome string pyrhong fastest program to chech if a string is a palindrome palindrome code python how to check if a string is a palindrome check if string palindrome def is_palindrome(input string) check string is palindrome or not python code checking for palindromes check if string is palendromic Write a function (incl. tests) that asks the user for a string and tells them whether or not it is a palindrome angular Write a function (incl. tests) that asks the user for a string and tells them whether or not it is a palindrome.string Write a function (incl. tests) that asks the user for a string and tells them whether or not it is a palindrome. palindrome sttring python python check if palindrome how to find the palindrome of a string in python palindrome code python palindrome with python python function palindrome string palindrome.py check if palindrome python check if string is palindrome in python string is a palindrome or not python python Create a function that returns a boolean whether the string is a strict palindrome. check palindrome in python check palindrome function python string palindrome list python Palidrom python how to check if a string is palindromic or not palindrome code python3 check for palindrome python palindrome check in python is palindrome python program to check palindrome or not python palindromic python compare letter of string to reverse string test palindrome python palindrome program is_palindorme python palindrome how to check palindrome in python python function for finding palindromes check if a string is a palindrome palindrome function in python python coding problem palindrome and alan built in function to check for a string is palindrome palindrome python is palindrome python palindrome program python palindrome test palindrome program in python palindrome in python check whether a string is palindrome or not in python Check if a String is Palindrome or not Program to Check if a Given String is Palindrome palindrome string in python Write a function that tests whether a string is a palindrome
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source