-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbreakIn.py
More file actions
20 lines (15 loc) · 763 Bytes
/
breakIn.py
File metadata and controls
20 lines (15 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This program takes as input a list of letters and returns the letters that did not
# appear in that input list. This was used for a single purpose but can become more
# versatile by altering the variable charsTotal
charsTaken = input("Input letters used: ").split(",")
charsTakenSet = set(charsTaken)
charsTotal = ['p', 'i', 'n', 'k', ' ', 'c', 'a', 'r', 'e', ' ', 'b', 'e', 'a', 'r']
charsTotalSet = set(charsTotal)
print("Letters to still use")
for char in charsTotalSet:
if charsTotal.count(char) != charsTaken.count(char):
if char == " ":
print("space " * (charsTotal.count(char) - charsTaken.count(char)), end="")
else:
print(f"{char} " * (charsTotal.count(char) - charsTaken.count(char)), end="")
print()