0

How can i do this?

You are required to complete the function reverse(x). given a string "x" as an input it is expected to return that same string but reversed.¶ Example: input : "again" output: "niaga"

22nd Apr 2021, 6:19 AM
Abdulaziz
Abdulaziz - avatar
3 Respostas
+ 2
Hi! Please, for better help for you show us your code attempt!
22nd Apr 2021, 6:25 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
Thank you bro i'l done
22nd Apr 2021, 6:33 AM
Abdulaziz
Abdulaziz - avatar
0
Its very easy You can use "for loop" for that, Like this :- st= input('enter the text: ') ln= len(st)+1 out_st= '' for i in range(1, ln): out_st += st[-i] print(out_st)
22nd Apr 2021, 6:29 AM
Priyanshu Kumar
Priyanshu Kumar - avatar