python3 reverse string code example
Example 1: python reverse string
'String'[::-1] #-> 'gnirtS'
Example 2: reverse string in python
'hello world'[::-1]
'dlrow olleh'
Example 3: reverse string python
txt = "Hello World"[::-1]
print(txt)
'String'[::-1] #-> 'gnirtS'
'hello world'[::-1]
'dlrow olleh'
txt = "Hello World"[::-1]
print(txt)