题目内容

以下哪个函数用来显示完整的模块清单、有关函数的帮助信息

A. dir()
B. import
C. print()
D. help()

查看答案
更多问题

以下哪个命令执行结果是错误的:

A. type(print)结果是:str
B. type(one)结果是:NoneType
C. type('5')结果是:str
D. type(5.0)结果是:float

以下哪个字符串表达式是正确的。

A. ’this'saapple!'
B. "this'saapple!'''
C. "this'saapple!"
D. "this'saapple!'

以下哪条命令的执行结果为3.14

A. print('{:.2f}'.format(3.1415926))
B. print('{:f.2}'.format(3.1415926))
C. print('{f:.2}'.format(3.1415926))
D. print('{.2:f}'.format(3.1415926))

以下哪一个表达式不能取出字符串s1='file1.txt'中的字符'.':

A. s1[5:6]
B. s1[6:7]
C. s1[-4:-3]
D. s1[s1.find('.'):s1.find('.')+1]

答案查题题库