KnowledgeBoat Logo

Computer Science

Find the output if the input string is 'Test'.

S = input("Enter String :")
RS = " "
for ch in S :
    RS = ch + RS
print(S + RS)

Python

Python String Manipulation

11 Likes

Answer

TesttseT

Working

The for loop reverses the input string and stores the reversed string in variable RS. After that original string and reversed string are concatenated and printed.

Answered By

6 Likes


Related Questions