# Python 3.9.5
def enter_string():
string = input('Enter string: ')
return string
def reverse_string(string):
reversed = string[::-1]
i = 0
count = 0
for i in range(len(string)):
if reversed[i].lower() == string[i].lower():
count += 1
i += 1
return count
def main():
string = enter_string()
print(reverse_string(string))
if __name__ == '__main__':
main()
Comments
Leave a comment