Below is the code to reverse a string in python using for loop.
str = "GetHowStuff"
print("Original string is",str)
revstr = ""
for i in str:
revstr = i + revstr
print("Reverse string (using for loop) is ",revstr)
Below is the code to reverse a string in python using for loop.
str = "GetHowStuff"
print("Original string is",str)
revstr = ""
for i in str:
revstr = i + revstr
print("Reverse string (using for loop) is ",revstr)