运行以下Python代码,程序的输出结果是?
vegetables = ['potato', 'tomato', 'cucumber', 'carrot']
# 列表共有4个元素,合法索引范围为~3
idx = 9 % len(vegetables)
print(vegetables[idx])
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析