# -*- coding: GBK -*-
#reverse: 相反的
cars = ["bmw", "audi", "toyota", "subaru"] print(cars) cars.reverse()
print(cars)

输出为:

['bmw', 'audi', 'toyota', 'subaru']
['subaru', 'toyota', 'audi', 'bmw']
04-30 01:13