Page 1 of 1

0.5 pts Question 1 Below is an attempt to reverse a string through recursion. Please choose the correct last line of cod

Posted: Thu May 05, 2022 12:43 pm
by answerhappygod
0 5 Pts Question 1 Below Is An Attempt To Reverse A String Through Recursion Please Choose The Correct Last Line Of Cod 1
0 5 Pts Question 1 Below Is An Attempt To Reverse A String Through Recursion Please Choose The Correct Last Line Of Cod 1 (70.08 KiB) Viewed 36 times
0.5 pts Question 1 Below is an attempt to reverse a string through recursion. Please choose the correct last line of code that complete the code. def reverse_str(s): if len(s)< 1: return s else: #your answer here O return reverse_str(s[1:])+ s[0] O return s[0] +reverse_str(s[1:]) O return s[1] + reverse_str(s[0:]) O return reverse_str(s[0:]) + s[1]