以下代码的输出结果是什么print("Python!"[:-1])
A: Python!
B: python
C: Python
D: python!
A: Python!
B: python
C: Python
D: python!
举一反三
- 以下程序的输出结果是:ls = [‘book’ , 666 ,[2018,’python’,20 ]print(ls[2][1][-2]) A: n B: python C: o D: 结果错误
- 以下程序的输出结果是:Lis1 = [1,2,[‘python’]]Lis2 =[‘ loves ’]Lis1[ 1 ] = lis2print(lis1) } A: [ lis2 ,2,[ 'python'] ] B: [1,[ 'loves'], [ 'python'] ] C: [1,2, ‘python' ,’loves' ] D: [1 ,2,[ 'python' ,'loves' ]
- 执行以下代码输出的是a = 〃Python〃print(a.upper()) A: PYTHON B: python C: Python D: "Python"
- 如下代码输出结果是 ( )s = 'Python is Open Source!'print(s[0:].upper()) A: PYTHON IS OPEN SOURCE B: Python is Open Source! C: PYTHON D: PYTHON IS OPEN SOURCE!
- s = 'Python is Open Source!'print(s[0:].upper())上述代码的输出结果是 A: PYTHON IS OPEN SOURCE! B: Python is Open Source! C: PYTHON IS OPEN SOURCE D: PYTHON