python中的pop()函数

pop()方法用于随机移除一个元素 例如:set.pop() 随机移除一个元素:web fruits = {'apple','banana','cherry'} x = fruits.pop() print(x) print(fruits) 输出为app banana {'cherry', 'apple'
相关文章
相关标签/搜索