def main(): with open("input6.txt") as file: text = file.read() groups = text.split("\n\n") print(f"I have {len(groups)} groups.") count = 0 for grp in groups: sgrp = set(grp.replace("\n", "")) count += len(sgrp) print(f"The total is {count}.") if __name__ == "__main__": main()