a = [1, 2, 3, 8, 9]def printlist(l, index): if index == len(l): return else: print(l[index]) printlist(l, index + 1)printlist(a, 0)
*****for和while循环底层用的是递归实现的
汉字转码:
s = r'\u722c\u866b\u95ee\u9898'
s1=s.encode(encoding='utf-8').decode('unicode_escape')
print(type(s1),s1)