📅  最后修改于: 2022-03-11 14:45:30.072000             🧑  作者: Mango
# Library
def solution(str):
return ''.join(reversed(str))
# DIY with recursion
def solution(str):
if len(str) == 0:
return str
else:
return solution(str[1:]) + str[0]