首页题库练习题目详情
Python程序设计单选题中等

假设有一个列表 scores = [90, 85, 70, 90, 80],下列哪个代码可以统计出该列表中90出现的次数?

0{ "key": "A", "text": "scores.count(90)" }
1{ "key": "B", "text": "len(scores) - scores.index(90)" }
2{ "key": "C", "text": "scores.remove(90)" }
3{ "key": "D", "text": "sum(1 for x in scores if x == 90)" }