reverse function python string code example
Example 1: python reverse string
'String'[::-1] #-> 'gnirtS'
Example 2: python string reverse
'hello world'[::-1]
# 'dlrow olleh'
'String'[::-1] #-> 'gnirtS'
'hello world'[::-1]
# 'dlrow olleh'