以下程序的输出结果是:d = { ‘ food’: { ‘cake’:1,’egg’:5} }print( d.get(‘egg’,’no this food’))
A. egg
B. 1
C. food
D. no this food
查看答案
以下程序的输出结果是:a = [[1,2,3], [4,5,6],[7,8,9]]s = 0for c in a:for j in range(3):s+= c[ j ]print(s) }
A. [1, 2,3,4,5,6,7,8,9]
B. 45
C. 24
D. 0
列表变量ls共包含10个元素,Is索引的取值范围是:
A. (0,10)
B. [0,10]
C. (1,10]
D. [0,9]
以下程序的输出结果是:CLis = list( range(5))print(5 in CLis)
A. True
B. False
C. 0
D. -1
以下程序的输出结果是:Is = ["apple" ," red" ," orange" ]def funC(a):ls. append(a)returnfunC(“ yellow " )print( ls )
A. [ ]
B. [“ apple” , “red” , “orange” ]
C. [ “ yellow” ]
D. [“apple ”, “red” , “orange” , “yellow” ]