I’ve been trying this problem for 30 minutes now and I still can’t get it right. Can anyone analyze my code and tell me what I’m doing wrong? It would be much appreciated. You can find the problem (Reverse the Number) in the EASY difficulty.
Here is my code:
T = int(input())
for j in range(T):
N = input()
string2=’’
for i in range((len(N)-1),-1,-1):
string2 = string2+str(N[i])
print(string2)