+ 2
Reverse string
I/p="disk drive" o/p='ksid evird'
5 ответов
+ 2
sentence="Disk Drive".split()
for i in sentence:
print(i[::-1], end=" ")
0
please give me the code
0
I will works but the o/p like this"evird ksid"
but required answer is" ksid evird"
0
kk it will works tq
0
Hey Try this code given below
def spell(txt):
for i in txt:
return txt[::-1]
txt = input()
print(spell(txt))
it will iterate over the complete string to show result