What I am trying to do:
i = ["FA 3B 65 01", "DA 1C 24 71", "BA 5B 71 21"]
# hexfile = "01 FA 3B 65 01 A2 D2 F1 B3 45 21 C5 C3 BA 5B 71 21 C3 F2 34..."
with open('hexfile', 'r') as file:
while line := file.read(32):
if any(i) in line #Find "FA 3B 65 01" in first 32bytes
any(i) = i #Assigns "i" to it
# Do things with i...
i = i #Reset the value of "i" to original
I know this code is non functional currently but this is this way to help me understand the issue I am having, essentially I want to assign multiple values to var i and if one of those value is located in my if statement then it selects that value and temporarily assigns i to it.