Reverse a string

 string = "hello world"

reversed_string = string[::-1]

print("The reversed string is", reversed_string)


Comments

Popular posts from this blog

Addition of Two numbers in Python

Linear Regression Model for House Price Prediction in Python

Project 01: Python Code for Music Recommendation with Explanation