> On Behalf Of Edward Kozlowski > I think this should do the trick. There's probably something > more concise than this, but I can't think of it at the moment. > > egt = {} > for key in record: > if key.startswith('E'): > egt[key] = record[key]
Not much more concise, but another way: egt = dict((key, record[key]) for key in record if key.startswith('E')) Regards, Ryan Ginstrom -- http://mail.python.org/mailman/listinfo/python-list