Untitled
user_5757903
plain_text
2 years ago
338 B
13
Indexable
while True:
string = input("Enter a string (or exit): ")
if string == "exit":
print("You exit the game.")
break
# Check if the string is symmetric
if string == string[::-1]:
print("The input string is symmetric.")
else:
print("The input string is not symmetric.")
Editor is loading...
Leave a Comment