python_求平均值

1.輸出字典內數組平均值python a = {'name': 'Tom', 'age': 20, 'address': '北京', 'score': [89, 99, 78, 95]} dic = a.get('score') print(dic) b = 0 for i in dic: b += i c = b / len(dic) #裏面字符的長度(也就是
相關文章
相關標籤/搜索