有列表定义如下:[br][/br]group1 = [ ["萧峰", 98], ["杨过", 96] ] 要提取两位大侠的名字"萧峰"和"杨过",应该采用下面哪种方法
A: n = [ item[0] for item in group1 ]
B: n =[ item[1] for item in group1 ]
C: n = group1[0],group1[1]
D: n = [ item for item in group1 ]
A: n = [ item[0] for item in group1 ]
B: n =[ item[1] for item in group1 ]
C: n = group1[0],group1[1]
D: n = [ item for item in group1 ]
举一反三
- 创建一个名为group1, GID为100的用户组的命令是: A: useradd group1 100 B: groupadd -g 100 group1 C: groupadd group1 100 D: group 100 group
- 以下语句获取表中第1行第1列(FirstName列)的数据,其中正确的语句是()。 A: AmyTable.Rows(0)(1) B: BmyTable.Rows(0).Item(1) C: CmyTable.Rows(0).Item(0) D: DmyTable.Rows(1)("FirstName") E: EmyTable.Rows(0).Item("FirstName")
- The problem of "fruits" also can be solved in the way below:d = {} for item in fruits: d[item] = d.___________(item, 0) + 1
- The members of the group are given a detailed tour by the tour guide. A: thing B: item C: itinerary D: matter
- The members of the group are given a detailed tour ________ by the tour guide. A: thing B: itinerary C: item D: matter