141. (简答题)文件“静夜思.txt”保存在当前文件夹下,其文件的编码为“utf-8”,现在需要打开并读取文件内容,可以获得以下格式的输出的程序代码段:静夜思李白床前明月光,疑似地主霜。举头望明月,低头思故乡。
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-d03a-c01a-2cf5d6189000.html
点击查看答案
86. (单选题)以下关于Python缩进的描述中,错误的是( )
A. Python用严格的缩进表示程序的格式框架,所有代码都需要在行前至少加一个空格
B. 缩进是可以嵌套的,从而形成多层缩进
C. 缩进表达了所属关系和代码块的所属范围
D. 判断、循环、函数等都能够通过缩进包含一批代码
解析:答案解析:
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-645b-c01a-2cf5d6189000.html
点击查看答案
178. (填空题)Python 语句如下s1=[1, 2, 3, 4]s2=[5,6,7]print(len(s1+s2))以上代码的运行结果是( )
https://www.shititong.cn/cha-kan/shiti/000dded1-b61f-17e8-c01a-2cf5d6189000.html
点击查看答案
119. (单选题)下列函数中,用于返回元组中元素最小值的是( )
A. len
B. max
C. min
D. tuple
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-a5f3-c01a-2cf5d6189000.html
点击查看答案
95. (单选题)在函数里面调用另外一个函数,这就是函数的( )调用。
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-765d-c01a-2cf5d6189000.html
点击查看答案
122. (单选题)字典的()(方法返回字典的“键”列表
A. keys()
B. key()
C. values()
D. items()
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-aa24-c01a-2cf5d6189000.html
点击查看答案
155. (判断题)列表是不可变数据类型
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-ec95-c01a-2cf5d6189000.html
点击查看答案
51. (单选题)对于字符串的标识,Python 中可使用的方法很多,下面正确的是( )
A. " What's happened to you?"
B. ' What's happened to you?'
C. ' What\\'s happened to you?'
D. "" Oh! " It sounds terrible."
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-1db2-c01a-2cf5d6189000.html
点击查看答案
132. ( )输入一个整数,输出其绝对值。将程序写在下方:思考:正数的绝对值不变,负数的绝对值需要加负号变为正数。
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-bf18-c01a-2cf5d6189000.html
点击查看答案
172. (判断题)位置参数必须在关键字参数的后面
https://www.shititong.cn/cha-kan/shiti/000dded1-b61f-0cfe-c01a-2cf5d6189000.html
点击查看答案