how to make a function that returns reverse a string fo word in python code example
Example 1: reverse string in python
'hello world'[::-1]
'dlrow olleh'
Example 2: reverse the string in python
string = "sachin"
print(string[::-1])
'hello world'[::-1]
'dlrow olleh'
string = "sachin"
print(string[::-1])