更新 function.py
Gitea Actions Challenge Test / Challenge-Actions (push) Successful in 11s

This commit is contained in:
2024-10-06 18:18:15 +08:00
parent c965007efe
commit 7e3f731722
+1 -1
View File
@@ -68,7 +68,7 @@ def classify0(inX, dataSet, labels):
classCount[voteLabel]=classCount.get(voteLabel,0)+1
# 返回出现次数最多的标签
sortedClasscount=sorted(
classCount.items(), key=operator, itemgetter(1), reverse = True
classCount.items(), key=operator.itemgetter(1), reverse = True
)
return sortedclassCount[0][0]