def gets(seq, key, default=None):
    'Gets a key from every element of a sequence if possible.'
    for x in seq:
        (yield x.get(key, default))
Gets a key from every element of a sequence if possible.
def gets(seq, key, default=None):
    
    for x in seq:
        (yield x.get(key, default))