build in reverse string python code example
Example 1: python reverse string
'String'[::-1] #-> 'gnirtS'
Example 2: how to reverse string in python
txt = "Hello World"[::-1]
print(txt)
'String'[::-1] #-> 'gnirtS'
txt = "Hello World"[::-1]
print(txt)