The code will read in a file and build a table with the ctn_no and seq_no which works fine. I want to change it so that when I find a break mark I build a table of ctn_no + 1 and seq_no + 1 rather than a table of ctn_no and seq_no. I can't seem to add one to the value that is read in from the file. I am new at this and am not sure what I'm doing wrong. I have tried many combinations attempting to increment the values. Below is the code before any modifications. Any help you can give would be appreciated. Thanks.
dctSequence = {}
# Open address file for reading
f = open(r'c:\MyData\DAG_OUTFILE.txt', 'r')
for i, line in enumerate(f):
temp = line.split('~')
ctn_brk = temp[15] # container break mark
ctn_no = temp[16] # container number
mail_type = temp[17] # mail type
seq_no = temp[18][0:len(temp[18])-1] # mail piece sequence number
# Ignore all records that have no container break or are unqualified
if ctn_brk == '#' and mail_type <> 'UNQ':
dctSequence[ctn_no] = seq_no
f.close