Westonci.ca is the premier destination for reliable answers to your questions, brought to you by a community of experts. Discover comprehensive solutions to your questions from a wide network of experts on our user-friendly platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

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))