字典fruit={'apple':'red','peach':'pink','lemon':'orange'},fruit['lemon']的结果是( )。
A: 'pink'
B: 'red'
C: 'orange'
D: Orange
A: 'pink'
B: 'red'
C: 'orange'
D: Orange
举一反三
- 下面创建数组的方法正确的有( )。 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];
- 以下代码的输出结果是。 d={‘fruit’:{‘apple’:4,’orange’:10}} print(d.get(‘apple’,’no’))( ) A: 4 B: no C: fruit D: orange
- Write a Python program to check common elements between two given list are in same order or not. [br][/br] Original lists:[br][/br] ['red', 'green', 'black', 'orange'][br][/br] ['red', 'pink', 'green', 'white', 'black'][br][/br] ['white', 'orange', 'pink', 'black']
- 下列语句执行后,di['fruit'][1]值为 。di={'fruit':['apple','banana','orange']}di['fruit'].append('watermelon')
- 某集合数据(“Banana”、“Lemon”、“Apple”、“Apple”、“Pear”、“Orange”),请删除集合中所有的“Apple”。