Write a Python function that takes a string, checks if it is a palindrome and returns true or false.
"level"
def is_palindrome(string):
    rev_string = string[::-1]
    if string == rev_string:
        return True
    else:
        return False 

print(is_palindrome("level"))