Hope this is a straightforward issue:
Here is my dictionary temp = {'0.1995': ['in1', 'in2'], '0.399': ['in0', 'y']})
code to search file:
for line in SPFFile:
temp_dict = temp
for val in temp_dict.itervalues():
if re.search(val.upper(),line) and ((re.search("^R",line) or re.search("^C",line))):
print "value found!"
My problem is that val is a list such as ['in1','in2'] while I need val to be 'in1' then 'in2' and so forth.
Also if I shouldn't be using a dictionary to do this please let me know. The dictionary was formed from two lists.