列表反转

lst=[1,2,3,4]
new_lst=[]
for x in reversed(lst):
    new_lst.append(x)
print(new_lst)

print(lst[::-1])

字符串反转

str='Apollo'
new_str=''
for x in reversed(str):
    new_str+=x
print(new_str)

print(str[::-1])