单选题 Python中获得字符串s长度的方法是()

A、 s.len()
B、 s.length
C、 len(s)
D、 length(s)
下载APP答题
由4l***i2提供 分享 举报 纠错

相关试题

单选题 在Python中,字典最外层使用:

A、( )括起来
B、[ ]括起来
C、{ }括起来
D、" "引起来

单选题 Python中,获取列表中的最小值使用:

A、min
B、max
C、count
D、sum

单选题 Python中,在列表strs=['a','b','c']中的元素a和b中间添加一个元素m,正确的是:

A、strs.add(0,'m')
B、strs.add(1,'m')
C、strs.insert(0,'m')
D、strs.insert(1,'m')

单选题 在Python中,要在字符串中添加换行符,可使用字符组合的是:

A、\a
B、\n
C、\q
D、\x

单选题 程序代码中②处可能的代码是:

A、n%2
B、n/2
C、n//2
D、n*2

单选题 程序代码中①处正确的代码是:

A、n%2
B、n/2
C、n//2
D、n*2

单选题 Python中,使用哪个关键字退出while循环:

A、break
B、continue
C、if
D、quit

单选题 在Python中,numbers=[1, 2, 3, 4, 5],执行print(numbers[:4])的结果为:

A、[4]
B、[5]
C、[1, 2, 3, 4]
D、[1, 2, 3, 4, 5]