How to reverse a string using the OOPS concept in python.
def reverse(S): S1 = "" for i in S: S1 = i + S1 return S1 S = "Python" print("The original string: ",S) print("The reverse string is: ",reverse(S))
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment