printing the reverse string using slicing in python code example
Example 1: reverse string in python
'hello world'[::-1]
'dlrow olleh'
Example 2: python 3 slice reverse
stringname[::-1]
'hello world'[::-1]
'dlrow olleh'
stringname[::-1]