why does the output of these two functions give different outputs when the logic or idea is the same and they are working with the same string?
def solution(inputString):
    a = ""
    b = a[::-1]
    if a == b:
        return True
    else:
        return False
print(solution("az"))
def ans(something):
    if something == reversed(something):
        print(True)
    else:
        print(False)
ans('az')
 
     
    