PythonReverse string in Python
def reverse_string(s):
return s[::-1]
string = "Hello, World!"
reversed_string = reverse_string(string)
print(reversed_string)
def reverse_string(s):
return s[::-1]
string = "Hello, World!"
reversed_string = reverse_string(string)
print(reversed_string)