motorcycles = ['honda', 'yamaha' ,'suzuki']

motorcycles.insert(0, "ducati")
print(motorcycles)

输出为:

['ducati', 'honda', 'yamaha', 'suzuki']

2:

motorcycles = []

motorcycles.append("honda")
motorcycles.append("yamaha")
motorcycles.append("suzuki") print(motorcycles)

输出为:

['honda', 'yamaha', 'suzuki']
05-11 08:29