programming-examples/python/String/Python program to reverse a string.py
2019-11-15 12:59:38 +01:00

6 lines
167 B
Python

def reverse_string(str1):
return ''.join(reversed(str1))
print()
print(reverse_string("abcdef"))
print(reverse_string("Python Exercises."))
print()