题目内容

有一个字符串变量s = 'python program',输出语句print(s[::-2]) 的输出结果是什么?

A. pto rga
B. mropnhy
C. yhnporm
D. margorp nohtyp

查看答案
更多问题

有一个字符串变量s = 'python program',语句print( s[ : : ] )的输出结果是什么?

A. program
B. margorp nohtyp
C. python program
D. python

有一个字符串变量s = 'python program',语句print(s[0: : ] ) 的输出结果是什么?

A. python
B. margorp nohtyp
C. program
D. python program

有一个字符串变量s = 'python program',语句print( s[0 : : 2] ) 的输出结果是什么?

A. pyt
B. agr otp
C. pto rga
D. ram

获得字符串s长度的函数是什么?

A. s.len()
B. s.length
C. len(s)
D. length(s)

答案查题题库