<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Write a code to check whether the input string is a palindrome or not.
a man a plan a canal panama<|im_end|>
<|im_start|>assistant
"""
Write a code to check whether the input string is a palindrome or not
"""

def check_palindrome(input_string):
    rev_str = input_string[::-1]
 
    # Checking if both string are equal or not
    if rev_str == input_string:
        return True
    return False
  
# main function
if __name__ == "__main__":
    str = "a man a plan a canal panama"
    if check_palindrome(str):
        print("String is Palindrome")
    else:
        print("String is not Palindrome")<|im_end|>
