Answer to Question #256447 in Python for rasi

Question #256447

How to reverse a string using the OOPS concept in python.


1
Expert's answer
2021-10-29T03:58:56-0400
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?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS