Returns the reverse of a string.
Use string slicing to reverse the string.
def reverse_string(s):
return s[::-1]
reverse_string("snippet") #"teppins"
Returns the reverse of a string.
Use string slicing to reverse the string.
def reverse_string(s):
return s[::-1]
reverse_string("snippet") #"teppins"