The easy way? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

The easy way?

A=input() a=[] n=0 s='' for i in A: a.append(i) n+=1 for j in range(n): s+=a[n-(j+1)] print(s) Have anyone the easiest way of the code?

25th Feb 2021, 4:06 PM
Shahzod Sayfiddinov
Shahzod Sayfiddinov - avatar
3 Answers
+ 5
You mean this? print(input()[::-1])
25th Feb 2021, 4:15 PM
Simba
Simba - avatar
+ 1
Thank you so much!
25th Feb 2021, 4:24 PM
Shahzod Sayfiddinov
Shahzod Sayfiddinov - avatar
0
Input Format: A string of a word in English. Output Format: A string of the reversed word that represents the original word translated into alien language.
25th Feb 2021, 4:08 PM
Shahzod Sayfiddinov
Shahzod Sayfiddinov - avatar