python:
with open('Input.txt') as inputfile:
st = inputfile.read().strip()
with open('Output.txt', 'w') as outputfile:
if st == st[::-1]:
outputfile.write('1')
else:
outputfile.write('0')
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
python:
with open('Input.txt') as inputfile:
st = inputfile.read().strip()
with open('Output.txt', 'w') as outputfile:
if st == st[::-1]:
outputfile.write('1')
else:
outputfile.write('0')