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