Python自學:第三章 使用方法pop()刪除元素
阿新 • • 發佈:2019-04-18
clas tor tle itl 輸出 color pytho 方法 moto
motorcycle = ["honda", "yamaha", "suzuki"] last_owned = motorcycle.pop() print("The last motorcycle I owned was a " + last_owned.title() + ".")
輸出為:
The last motorcycle I owned was a Suzuki.
Python自學:第三章 使用方法pop()刪除元素