阅读背景:

拆分文件并将其转换为python中的字典

来源:互联网 
counts = dict()

for word in x:                                  # x is file named "f2.txt"
    words = word.split()
    print words
    counts[words] = counts.get(words,0) + 1
print counts 
counts = dict()

for word in x:                



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: