Question: In python, 8. Write a function called doublePalindrome which is passed a string and returns True if the string is a double palindrome (the same
In python,
8. Write a function called doublePalindrome which is passed a string and returns True if the
string is a "double" palindrome (the same word forward and backwards and every letter appears
twice in a row. Examples: aabbccbbaa, a, , ccaattaacc). Otherwise return False.
"""
# Your function goes here - uncomment the next lines
"""
s = "aabbccddccbbaa"
print("Double palindrome %s ? %s" % (s,doublePalindrome(s)))
s = "aabbcbbaa"
print("Double palindrome %s ? %s" % (s,doublePalindrome(s)))
s = "aa"
print("Double Palindrome %s ? %s" % (s,doublePalindrome(s)))
"""
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
