You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
12345678910111213 |
- 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()
|