题目内容

表达式 'apple.peach,banana,pear'.find('p') 的值为_____(__)_____。

A. 1
B. 2
C. 6
D. -1

查看答案
更多问题

表达式 list(filter(lambda x:x>2, [0,1,2,3,0,0])) 的值为___()____。

A. [3]
B. 3
C. {3}
D. (3)

表达式 list(range(50, 60, 3)) 的值为_____________(_)_______。

A. [50, 53, 56, 59]
B. [50, 51, 52]
C. [53, 56, 59]
D. [57,58, 59,]

使用上下文管理关键字____(__)______可以自动管理文件对象,不论何种原因结束该关键字中的语句块,都能保证文件被正确关闭。

A. continue
B. break
C. with
D. With

Python标准库os中用来列出指定文件夹中的文件和子文件夹列表的方式是_____(_)____。

A. exists()
B. listdir()
C. listdirs()
D. exist()

答案查题题库