# Tutorial 4 - Problem 4 # # Write a function that determines whether a string is a palindrome # without using a loop. :) # # Anne Lavergne # Dec. 2015 def is_palindrome(aString): result = False if aString == aString[::-1]: result = True return result # Main word1 = 'aibohphobia' # Test Case 1 word2 = 'Aibohphobia' # Test Case 2 print("'{}' is a palindrome? {}".format(word1, is_palindrome(word1))) print("'{}' is a palindrome? {}".format(word2, is_palindrome(word2)))