Python QnA

Q) How do you reverse a string in python?

A) str = "Senthil"
str[-1::-1]
Using the slicing operator which takes three arguments.

No comments: