Computer Science

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

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

Python

Python String Manipulation

14 Likes

Answer

The program gives an error at line RS = ch + 2 + RS. The operands to + are a mix of string and integer which is not allowed in Python.

Answered By

4 Likes


Related Questions