下面代码的输出结果是()for a in ["torch","soap","bath"]:print(a,end=",")
A. torch,soap,bath,
B. torch,soap,bath
C. torchsoapbath
D. torch soap bath
查看答案
s = 'Python is beautiful!'可以输出“python”的是( )
A. print(s[-21: -14].lower)
B. print(s[:-14])
C. print(s[0:6])
D. print(s[0:6].lower())
s="Happy New Year",则s[3:8]的值为( )
A. 'py Ne'
B. 'ppy N'
C. 'py New'
D. 'ppy Ne'
下列选项中可以获取Python整数类型帮助的是( )
A. dir(str)
B. help(int)
C. help(float)
D. dir(int)
Temp="1234a",那么print(temp[0:-1])输出结果是()
A. a4321
B. 1234a
C. 1234
D. 234a