#!/usr/bin/env python
"""Advent of Code 2017: Day 04, Part 2"""

def main():
    """Main function"""
    valid_num = 0
    file = open('input.txt', 'r')
    for line in file:
        words = line.split()
        seen = set()
        dups = False
        for word in words:
            word_list = list(word)
            word_list.sort()
            word_list = str(word_list)
            if word_list in seen:
                dups = True
                break
            else:
                seen.add(word_list)
        if not dups:
            valid_num += 1
    print(valid_num)

if __name__ == '__main__':
    main()

1b68e5bd438cc9ccf7ad288255bcec370d0d7615
<mask token>

<mask token>


def main():
    """Main function"""
    valid_num = 0
    file = open('input.txt', 'r')
    for line in file:
        words = line.split()
        seen = set()
        dups = False
        for word in words:
            word_list = list(word)
            word_list.sort()
            word_list = str(word_list)
            if word_list in seen:
                dups = True
                break
            else:
                seen.add(word_list)
        if not dups:
            valid_num += 1
    print(valid_num)


<mask token>

<mask token>


def main():
    """Main function"""
    valid_num = 0
    file = open('input.txt', 'r')
    for line in file:
        words = line.split()
        seen = set()
        dups = False
        for word in words:
            word_list = list(word)
            word_list.sort()
            word_list = str(word_list)
            if word_list in seen:
                dups = True
                break
            else:
                seen.add(word_list)
        if not dups:
            valid_num += 1
    print(valid_num)


if __name__ == '__main__':
    main()

#!/usr/bin/env python
"""Advent of Code 2017: Day 04, Part 2"""

def main():
    """Main function"""
    valid_num = 0
    file = open('input.txt', 'r')
    for line in file:
        words = line.split()
        seen = set()
        dups = False
        for word in words:
            word_list = list(word)
            word_list.sort()
            word_list = str(word_list)
            if word_list in seen:
                dups = True
                break
            else:
                seen.add(word_list)
        if not dups:
            valid_num += 1
    print(valid_num)

if __name__ == '__main__':
    main()
