Untitled

 avatar
user_5757903
plain_text
13 days ago
338 B
1
Indexable
Never
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.")
Leave a Comment