Westonci.ca is your go-to source for answers, with a community ready to provide accurate and timely information. Connect with a community of experts ready to provide precise solutions to your questions on our user-friendly Q&A platform. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly 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))