import collections

with open("newsafr.txt", "r", encoding= "utf-8") as f:
    array = [line.strip().split() for line in f]
    p = collections.Counter()
    data = []
    for i in range(len(array)):
        for j in range(len(array[i])):
            if len(array[i][j]) > 6:
                data.append(array[i][j])
    for word in data:
         p[data] += 1



print(data)
print(p)


#Ошибка TypeError: unhashable type: 'list'

