motorcycles = ['honda', 'yamaha', 'suzuki']
print(motorcycles) motorcycles[0] = 'ducati'
print(motorcycles)
输出为:
['honda', 'yamaha', 'suzuki']
['ducati', 'yamaha', 'suzuki']
motorcycles = ['honda', 'yamaha', 'suzuki']
print(motorcycles) motorcycles[0] = 'ducati'
print(motorcycles)
输出为:
['honda', 'yamaha', 'suzuki']
['ducati', 'yamaha', 'suzuki']