python -字典生成器

需求1:假設有20個學生,學生分數在60~100之間,篩選出成績在90分以上的學生web #通常作法 import random stuInfo={} for i in range(20): name = 'westos' + str(i) score = random.randint(60,100) stuInfo[name] = score print(stuInfo
相關文章
相關標籤/搜索