中国大学MOOC: 下面代码的输出结果是[gold, brown],请补充print(s[])语句的切片区间( ) s =[seashell,gold,pink,brown,purple,tomato]print(s[])
举一反三
- 下面代码的输出结果是( )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']
- 下面代码的输出结果是s=["seashell","gold","pink","brown","purple","tomato"]print(s[4:]) A: ['gold', 'pink', 'brown', 'purple', 'tomato'] B: ['purple'] C: ['purple', 'tomato'] D: ['seashell', 'gold', 'pink', 'brown']
- 中国大学MOOC: 下面代码的输出结果是s =[seashell,gold,pink,brown,purple,tomato]print(s[4:])
- 下面代码的输出结果是<br/>s =["seashell","gold","pink","brown","purple","tomato"]<br/>print(s[4:])<br/>A<br/>['purple']<br/>B<br/>['purple', 'tomato']<br/>C<br/>['gold', 'pink', 'brown', 'purple', 'tomato']<br/>D<br/>['seashell', 'gold', 'pink', 'brown'] A: ['purple'] B: ['purple', 'tomato'] C: ['gold', 'pink', 'brown', 'purple', 'tomato'] D: ['seashell', 'gold', 'pink', 'brown']