I'm new to python but have experience in perl. So I have a dictionary like this
d = { '123' : 'F'
      '124' : 'S'
      '125' : 'F'
    }
and I'm running a loop for a list which has the key values, but some may not exist in my dictionary. When I run the code I get an error
print(d[str(row[0])])
KeyError: '126'
Perl would never do this to me. Please help an ignorant programmer.
 
     
     
     
    