Myntra Interview Question | Reverse String
Question
Write a program in Python to reverse a string without using inbuilt
function reverse string?
in progress
0
Interview Question
4 years
5 Answers
1102 views
Grand Master 0
Answers ( 5 )
s1 = “swapnil”
print(s1)
#output – swapnil
s2 = s1[::-1]
print(s2)
#output – linpaws
reverse_string=string[::-1]
return reverse_string
return string[::-1]
string = input(“Enter the word: “)
reverse_string = string[::-1]
final_output = print(reverse_string)
Enter the word: Kassandra
ardnassaK
Process finished with exit code 0
s=input()
s=s[::-1]
print(p)