题目内容

下面哪个选项输出"p"?

A. s="python"print(s[-6])
B. s="python"print(s[0:])
C. s="python"print(s[5])
D. s="1python"print(s[0])

查看答案
更多问题

下面哪个结果为字符串"hello world"?

A. "hello"+"world"
B. "hello\nworld"
C. "hello"+" "+"world"
D. "\thello\tworld\t"

下面哪个结果不是字符串?

A. str(100)
B. hex(35)
C. oct(67)
D. len("abc123")

下面哪个选项是将字符串"java language"变成"python language"?

A. "java language".strip("python")
B. "java language".replace("java", "python")
C. "java language".startswith("python",0,13)
D. "java language". endswith("python",0,13)

下面哪个选项不是输出整数125的十六进制?

A. print(“{0:x}”.format(125))
B. print(“{0:d}”.format(125))
C. print(“{0:X}”.format(125))
D. print(hex(125))

答案查题题库