逆转字符串
def aaa(oldstr):
newlist = []
for i in range(len(oldstr)-1,-1,-1):
print(i)
newlist.append(oldstr[i])
print(''.join(newlist))
aaa('abcdefghijk')
print('abcdefghijk'[::-1])
def aaa(oldstr):
newlist = []
for i in range(len(oldstr)-1,-1,-1):
print(i)
newlist.append(oldstr[i])
print(''.join(newlist))
aaa('abcdefghijk')
print('abcdefghijk'[::-1])