已知列表list1 = [1,2,3,4,2],执行print(list1[2])后,程序运行结果为()。
A. 1
B. 2
C. 4
D. 3
已知列表list1 = ["Python", "HTML","PHP","Java"], 执行print(list1[O:1])后,程序运行结果为()
A. [ ]
B. ["Python","HTML"]
C. ["Python"]
D. ["Python", "HTML","PHP","Java"]
已知列表list1 = [1,2,3,4,5,6],执行下列代码,运行结果为()。 list1=[1,2,3,4,5,6] for i in list1: if i % 2 == 0: print(i, end="")
A. 135
B. 246
C. [2,4,6]
D. [ ]
已知列表list1中元素如下代码所示,在执行下述代码后,list1的值为()。 List1 = ["C++","HTML","PHP","Java"] List1[2] ="Python"
A. ['C++', 'HTML', PHP', 'Java']
B. ['C++', 'HTML','Python','Java']
C. ['C++', 'Python','PHP','Java']
D. ['Java', 'PHP','HTML','C++']