某集合数据(“Banana”、“Lemon”、“Apple”、“Apple”、“Pear”、“Orange”),请删除集合中所有的“Apple”。
举一反三
- 已知s="apple,banana,pear,apple",则表达式s.count('apple')的值为_______。
- 下面创建数组的方法正确的有( )。 A: var fruit=new Array("apple","banana","orange","peach"); B: var fruit={"apple","banana","orange","peach"}; C: var fruit=["apple","banana","orange","peach"]; D: var fruit=["apple","banana","orange",123];
- {'apple', 'orange', 1} 是一个集合。
- 以下代码运行后的结果是?f = ['apple','banana','pear']print('apPle' in f)
- (4)请将香蕉banana用工具 H—Head,T—Tail从L中取出。 L=(apple,(orange,(strawberry,(banana)),peach),pear)