0.5 pts Question 1 Below is an attempt to reverse a string through recursion. Please choose the correct last line of cod
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
0.5 pts Question 1 Below is an attempt to reverse a string through recursion. Please choose the correct last line of cod
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]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!