def make_word_list(file_object):
    return [line.strip() for line in file_object]
def is_anagram(s1, s2):
    return sorted(s1) == sorted(s2)
def find_anagrams(word_list):
    anagram_dict = {}
    for word in word_list:
        k = str(sorted(word))
        anagram_dict[k] = anagram_dict.get(k, []) + [word]
    for k, v in sorted(anagram_dict.items()):
        if len(v) > 1:
            print(str(k), str(v))
if __name__ == '__main__':
    fin = open('words.txt')
    word_list = make_word_list(fin)
    find_anagrams(word_list)
When I run this program, it keeps printing string (the 'k' one) as list of strings. I checked type and it confirmed it's a string. Please help.
 
    