my first list of set:
set1 = [
{'read', 'execute', 'helloworld.exe'},
{'read', 'pinglog', 'write'},
{'read', 'nya'},
{'read', 'execute', 'write', 'goodluck'}
]
now I am looking if these different sets below are in the first list of sets.
final = [
{'read', 'nya'},
{'helloworld.exe', 'write'},
{'execute', 'nya'},
{'read', 'pinglog'},
{'write', 'pinglog'}
]
the expected outcome is
OK
Access denied
Access denied
OK
OK
OK
This is my code, I know not much, but my head is already aching for I am trying to do this for two days:
for j in range(len(final)):
for i in range(len(set1)):
if final[j] == set1[i]:
print("OK")
print("Access denied")