【Python】字符串反转

代码:

def rvs(s):
    if s=="":
        return s
    else:
        return rvs(s[1:])+s[0]
print(rvs("123"))

    
原文地址:https://www.cnblogs.com/HGNET/p/12590971.html