题目内容

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

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

查看答案
更多问题

有一个字符串变量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

答案查题题库