首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下面代码的输出结果是( )。 list=[[0,1,2],"123.0","python"] a=all(1ist[0]) b=list[1].split(".") c=ascii(list[2]) print(a,b,c)
下面代码的输出结果是( )。 list=[[0,1,2],"123.0","python"] a=all(1ist[0]) b=list[1].split(".") c=ascii(list[2]) print(a,b,c)
admin
2021-03-16
18
问题
下面代码的输出结果是( )。
list=[[0,1,2],"123.0","python"]
a=all(1ist[0])
b=list[1].split(".")
c=ascii(list[2])
print(a,b,c)
选项
A、True[‘123’]‘python’
B、False[‘0’]‘1’
C、True[‘123’,‘0’]‘1’
D、False[‘123’,‘0’]‘python’
答案
D
解析
all(x)函数在组合类型变量x中所有元素为真时返回True,为假时返回False,若为空,则返回True,所以a的值为False;b中split()是字符串分隔函数,返回分隔后的值应为[’123’,’0’];C中ascii()的参数是字符串python,所以返回’python’。本题选择D选项。
转载请注明原文地址:https://kaotiyun.com/show/S06p777K
本试题收录于:
二级Python题库NCRE全国计算机二级分类
0
二级Python
NCRE全国计算机二级
相关试题推荐
设有学生(学号,姓名,性别,出生日期)和选课(学号,课程号,成绩)两个关系,并假定学号的第3、4位为专业代码。要计算各专业学生选修课程号为“101”课程的平均成绩,正确的SQL语句是()。
假设“图书”表中有C型字段“图书编号”,要求将图书编号以字母A开头的图书记录全部打上删除标记,可以使用SQL命令()。
有借阅表(借阅.DBF),其结构如下:借书证号C(5),总编号C(6),借书日期D下面能够成功向该表插入一条记录的SQL语句是()。
在考生文件夹下完成下列操作。为了查询低价机票,清设计一个表单myform.scx,其界面如下图所示:表单控件名为formone,表单的标题为“机票折扣查询”。表单左侧有1个标签控件Lahclone用于显示内容“输入折扣”,1个文本框控件Text1用
在VisualFoxPro中,要运行查询文件Student.qpr,可以使用命令()。
下面关于创建报表的方法中,错误的是()。
假设某个表单中有一个复选框(CheckBoxl)和一个命令按钮Command1,如果要在Command1的Click事件代码中取得复选框的值,以判断该复选框是否被用户选择,正确的表达式是
结构化程序设计中,下面对goto语句使用描述正确的是
设一棵完全二叉树共有700个结点,则此二叉树中的叶子结点数为
算法的时间复杂度是指
随机试题
周女士,头晕乏力半年,手足关节痛3年余,查体双手指5肌肉萎缩,手指向尺侧偏,X线显示关节腔变窄,关节半脱位,血沉380mm/h,此患者最可能的诊断是
通过消化道传播的病毒是
李祥与银行签订借款抵押担保合同,以一幢价格为20万元的房屋作抵押,借款15万元,并办理抵押登记;后李祥从袁某处借款7万元,仍以该房屋抵押担保,并办理了登记。李祥又以家中冰箱彩电等总计2.5万元作抵押,向蒋某借款3万元,写了借条和抵押担保书;后李祥从沈某处借
本单位档案机构为方便保管会计档案,可以根据需要自行对档案进行拆封、重新整理。()
会计人员继续教育的对象不包括已取得会计从业资格但不在会计岗位的人员。()
如果变量X、Y之间的线性相关系数为0,则表明变量X、Y之间是独立的。()
一般资料:求助者,男性,25岁,未婚,饭店服务员。求助者自述:因感情问题而苦恼,伴有失眠,一月余。案例介绍:求助者高中时曾经与班里一位女同学关系很好,毕业后成为恋人。因离开家乡到城市打工,彼此不常见面。半年前在老乡聚会时认识了一个长得很漂亮
UML提供了5种对系统动态方面建模的图,其中(1)对系统行为组织和建模;(2)对系统功能建模,它强调对象之间的控制流;(3)之间是同构的。(2)
WhatwasPaulaRadcliffe’sperformancelikeinAthens?
A、Depressing.B、Refreshing.C、Painful.D、Delightful.A男士在谈到圣诞节的天气时,提到有一点点令人压抑,因此答案为A。B“令人耳目一新的”、C“令人痛苦的”和D“令人高兴的”与男士的描述不符。
最新回复
(
0
)