リストを pop すると、 pop された値が返される。
例
plant_1 = ['pumpkin', 'ginger', 'potato']
plant_2 = []
print('plant_1 is ' + str(plant_1))
print('plant_2 is ' + str(plant_2))
plant_2.append(plant_1.pop())
print('============')
print('plant_1 is ' + str(plant_1))
print('plant_2 is ' + str(plant_2))
結果
plant_1 is ['pumpkin', 'ginger', 'potato']
plant_2 is []
============
plant_1 is ['pumpkin', 'ginger']
plant_2 is ['potato']