import re
from collections import Counter
words = re.findall('\w+', open('/Users/Jack/Desktop/testytext').read().lower())
listy = Counter(words).most_common()
theNewList = list(listy)
theNewList[1][1] = 10
#****ERROR HERE****
#Traceback (most recent call last):
# File "countTheWords.py", line 16, in <module>
# theNewList[1][1] = 10
#TypeError: 'tuple' object does not support item assignment
在我看来, list() 调用应该将“listy”转换为列表。知道我做错了什么吗?