[This is for everyone wondering what that obfuscated code @Ded Cat posted was all about :)]
**SPOILERS AHEAD**
emptyList = []
# Ybbc guebhtu nyy cbffvoyr pbqrf naq zngpu gurz gb gurve uvag nafjref
# Loop through all possible codes and match them to their hint answers
for i in range(0, 10000):
listComprehension = [int(every) for every in str(i).zfill(4)]
# Uvagf 1 naq 4 arrq gb or snyfr sbe erqhaqnapl
# Hints 1 and 4 need to be false for redundancy
magicList = [False, False, False]
if listComprehension[0] == 1 or listComprehension[0] % 2 == 0:
continue
if listComprehension[1] == 2:
magicList[0] = True
if listComprehension[2] == 3:
magicList[1] = True
if listComprehension[3] > sum(listComprehension[:3]):
magicList[2] = True
emptyList.append([listComprehension, magicList])
# Pbhag bppheeraprf bs rnpu havdhr uvag
# Count occurrences of each unique hint
myDictionary = {}
for randomSymbol, magicList in emptyList:
magicListTuple = tuple(magicList)
myDictionary[magicListTuple] = myDictionary.get(magicListTuple, 0) + 1
# Cevag pbqrf jvgu havdhr uvagf
# Print codes with unique hints
for listComprehension, magicList in emptyList:
if myDictionary[tuple(magicList)] == 1:
print(listComprehension)
# Resulting print is [3, 2, 3, 9]