网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下面哪一个是错误的?
A.使用len(列表名)测量元素的个数names_list=["zhangsan","lisi","wangwu"]print(len(names_list))
B.使用列表名[下标]获取列表的某个元素,例如:names_list=["zhangsan","lisi","wangwu"]print(names_list[2])
C.向列表中添加新元素有三个方法:append、extend、insert,例如:names_list=["zhangsan","lisi","wangwu"]names_list.append("zhaoliu")names_list.extend(["zhaoliu","liqi"])names_list.insert(1,"zhaoliu")print(names_list)
D.已有列表nums=[11,22,33,44,55],使用while循环遍历列表nums=[11,22,33,44,55]i=0 whilei
print(nums[i])i+=1
参考答案
更多 “ 下面哪一个是错误的? A.使用len(列表名)测量元素的个数names_list=["zhangsan","lisi","wangwu"]print(len(names_list))B.使用列表名[下标]获取列表的某个元素,例如:names_list=["zhangsan","lisi","wangwu"]print(names_list[2])C.向列表中添加新元素有三个方法:append、extend、insert,例如:names_list=["zhangsan","lisi","wangwu"]names_list.append("zhaoliu")names_list.extend(["zhaoliu","liqi"])names_list.insert(1,"zhaoliu")print(names_list)D.已有列表nums=[11,22,33,44,55],使用while循环遍历列表nums=[11,22,33,44,55]i=0 whileiprint(nums[i])i+=1 ” 相关考题
考题
单选题指出下面哪组俞募配穴是错误的()A
肺俞云门B
肝俞期门C
脾俞章门D
肾俞京门E
胆俞日月
热门标签
最新试卷