reverse a string in python using slicing in for loop code example
Example 1: reverse string in python
'hello world'[::-1]
'dlrow olleh'
Example 2: python string reverse
'hello world'[::-1]
# 'dlrow olleh'
'hello world'[::-1]
'dlrow olleh'
'hello world'[::-1]
# 'dlrow olleh'