"Alan Gauld" <alan.gauld at btinternet.com> wrote Oops! Should be: > def findDict(value, dictList): > for dct in dictList: > if dct.get('code', '') == my_code if dct.get('code', '') == value > return dct > HTH, > > > -- > Alan Gauld > Author of the Learn to Program web site > http://www.alan-g.me.uk/ >