Reverse a string

 string = "hello world"

reversed_string = string[::-1]

print("The reversed string is", reversed_string)


Comments

Popular posts from this blog

Hello World Python Code with Explanation

Addition of Two numbers in Python

Iris Flowers Classification ML Project with Code