21. (多选题)ls为一个列表,下面正确的选项有:
A. ls.pop(0)总是可以获取去除第一个元素的列表
B. 对于空列表,ls.pop()会触发异常
C. ls[1:]都可以获取去除第一个元素的列表,列表为空时仍返回空列表
D. 对于非空列表,ls.pop(0)可以获取去除第一个元素的列表
https://www.shititong.cn/cha-kan/shiti/000dded1-b61d-dc00-c01a-2cf5d6189000.html
点击查看答案
157. (判断题)通过索引可以修改和访问元组的元素
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-efac-c01a-2cf5d6189000.html
点击查看答案
38. (单选题)用于返回字符串s的长度的函数为:
A. abs(s)
B. len(s)
C. count(s)
D. max(s)
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-0177-c01a-2cf5d6189000.html
点击查看答案
168. (判断题)函数体以冒号起始,并且是缩进格式的
https://www.shititong.cn/cha-kan/shiti/000dded1-b61f-0571-c01a-2cf5d6189000.html
点击查看答案
79. (单选题)可变参数*args传入函数时的存储方式为( )
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-55fb-c01a-2cf5d6189000.html
点击查看答案
37. (单选题)s.count(x) 的返回值是:
A. 字符串s中x的序号
B. 字符串s中x的数量
C. 字符串x中s的数量
D. 字符串x中s的序号
https://www.shititong.cn/cha-kan/shiti/000dded1-b61d-ff62-c01a-2cf5d6189000.html
点击查看答案
64. (单选题)pandas中哪个函数不能实现数据的合并()
A. agg()
B. concat()
C. join()
D. merge()
解析:答案解析:
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-374a-c01a-2cf5d6189000.html
点击查看答案
20. (多选题)对列表[25, 13, 36, 1]进行排序并输出,下面程序正确的有:
A. ls = [25, 13, 36, 1]ls.sort()print(ls)
B. ls = [25, 13, 36, 1]ls.sorted()print(ls)
C. ls = [25, 13, 36, 1]print(ls.sort())
D. ls = [25, 13, 36, 1]print(sorted(ls))
https://www.shititong.cn/cha-kan/shiti/000dded1-b61d-d9c1-c01a-2cf5d6189000.html
点击查看答案
74. (单选题)以下选项中不符合 Python 语言变量命名规则的是( )
A. TempStr
B. 3ⱣⱤ1
C. ⱣⱤAl
D. l
解析:答案解析:
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-4c03-c01a-2cf5d6189000.html
点击查看答案
58. (单选题)若要获取两个集合A和B的并集,在Python 中应该使用( )
A. B
B. A+B
C. A|B
D. A^B
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-2b1e-c01a-2cf5d6189000.html
点击查看答案