+ 4
How to reverse a string in python??
input: name output: eman
9 Respostas
+ 5
string_name [::-1]
+ 4
I believe this is the code you are looking for:
https://code.sololearn.com/cr2ZNyhEWdlV/?ref=app
+ 2
I made a little program for reversing:
a = input("")
b = ""
c = len(a)-1
i = 0
while(i<=c):
b = b + a[c-i]
i = i+1
print (b)
https://code.sololearn.com/c36AYfYjHmx0/?ref=app
+ 1
is there any other way?
like by making a list
+ 1
def spell(txt):
#your code goes here
rev = ''.join(reversed(txt))
print(rev)
txt = input()
spell(txt)
0
how can we compiler java frd
0
Hi Mitali... I need some help..
0
name_string = "hello world"
print(name_string[::-1])
output
dlrow olleh