Westonci.ca is your go-to source for answers, with a community ready to provide accurate and timely information. Get immediate and reliable solutions to your questions from a knowledgeable community of professionals on our platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

array Write a recursive function stringReverse that takes a string and a starting subscript as arguments, prints the string backward and returns nothing. The function should stop processing and return when the end of the string is encountered. Note that like an array, the square brackets ( [ ] ) operator can be used to iterate through the characters in a string.

Sagot :

user_in = str ( input ("Please enter a phrase: " ))

def reverse_str (string):

e = 0

for e in range (len (string)):

x = -1

print string[x]

x += (len (string))