python写法 import sys a = sys.stdin.readline().strip() # 去除\n等字符 a = a.split(' ') b = [] c = [0 for i in range(len(a))] for i in a: b.append(i) # 顺序存入列表 for i in range(len(a)): c[len(a)-1-i] = b[i] # 逆序存入列表 for i in range(len(a)): # 输出 print(c[i],end=' ')