下列代码的运行结果是()
>>>fruit=('blue',1234,('apple','pear','peach','mango'))
>>>fruit[-1][2]
A: peach
B: apple
C: mango
D: pear
>>>fruit=('blue',1234,('apple','pear','peach','mango'))
>>>fruit[-1][2]
A: peach
B: apple
C: mango
D: pear
举一反三
- 下列代码的运行结果是()fruit=('blue',1234,('apple','pear','peach','mango'))fruit[-1][1] A: apple B: pear C: peach D: mango
- 程序运行结果为(______ )fruit = ['apple', 'banana', 'mango', 0]for item in fruit: if item == 0: fruit[item] = 'watermelon' elif item == 'mango': fruit[2] = 'pear'print(fruit)
- 执行下列语句后运行结果正确的是(<br/>)<br/>>>>s=[1,2,3,4,5]<br/>>>>s[1:3] A: [2,3,4] B: [2,3] C: [1,2,3] D: 2,3
- 请写出下列语句的运行结果:>>>list=['a','b','c','d']>>>print(list[1:3])
- >>>x = [1, 2, 1, 1, 2]>>>x.remove(2)语句运行结果正确的是( )。 A: [1, 1, 1, 2] B: [1, 2, 1, 2] C: [1, 2, 1, 1] D: [1, 1, 1]