how to convert string in python with reverse function code example Example: reverse string in python 'hello world'[::-1] 'dlrow olleh'