下面代码的输出结果是( ) 。s =["seashell","gold","pink","brown","purple","tomato"]print(s[1:4:2])
A: ['gold', 'pink']
B: ['gold', 'brown']
C: ['gold', 'pink', 'brown', 'purple', 'tomato']
D: ['gold', 'pink', 'brown']
A: ['gold', 'pink']
B: ['gold', 'brown']
C: ['gold', 'pink', 'brown', 'purple', 'tomato']
D: ['gold', 'pink', 'brown']
举一反三
- 下面代码的输出结果是s =["seashell","gold","pink","brown","purple","tomato"]print(s[1:4:2]) A: ['gold', 'pink', 'brown', 'purple', 'tomato'] B: ['gold', 'pink'] C: ['gold', 'brown'] D: ['gold', 'pink', 'brown']
- 下面程序的输出结果是()。 s=["seashell","gold","pink","brown","purple","tomato"] print(s[1:4:2]) A: ["gold","brown“] B: ["gold","pink","brown"] C: ["gold","pink"] D: s=["seashell","pink","brown","purple","tomato"]
- 以下程序的输出结果是( )s =["seashell","gold","pink","brown","purple","tomato"]print(s[1:4:2]) A: ['gold', 'pink', 'brown'] B: ['gold', 'pink'] C: ['gold', 'pink', 'brown', 'purple', 'tomato'] D: ['gold', 'brown']
- 下面代码的输出结果是( )s=["seashell","gold","pink","brown","purple","tomato"]print(s[4:]) A: ['purple', 'tomato'] B: ['gold', 'pink', 'brown', 'purple', 'tomato'] C: ['seashell', 'gold', 'pink', 'brown'] D: ['purple']
- 下面代码的输出结果是s =["seashell","gold","pink","brown","purple","tomato"]print(s[4:]) A: ['purple', 'tomato'] B: ['gold', 'pink', 'brown', 'purple', 'tomato'] C: ['seashell', 'gold', 'pink', 'brown'] D: ['purple']