Doubt | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 4

Doubt

What is the code to do this When we type a text,how do we flip it and print it E.g:When the text is rat , it should print tar

6th Jun 2020, 7:58 AM
John Thomas Jomy
John Thomas Jomy - avatar
5 Respostas
6th Jun 2020, 8:16 AM
Piotr Kraj
Piotr Kraj - avatar
+ 3
Thanks everyone
6th Jun 2020, 10:46 AM
John Thomas Jomy
John Thomas Jomy - avatar
+ 1
Any language If python, great
6th Jun 2020, 8:16 AM
John Thomas Jomy
John Thomas Jomy - avatar
+ 1
Yes,reverse a string
6th Jun 2020, 8:16 AM
John Thomas Jomy
John Thomas Jomy - avatar
+ 1
st = "rat" print(st[::-1]) OUTPUT: tar
6th Jun 2020, 8:18 AM
Rohit