Return the values of the attributes for the given data

    :param data: the data
    :param attrs: strings
    :returns: a list

    With a dict::

        >>> band = {'name': 'Metallica', 'singer': 'James Hetfield', 'guitarist': 'Kirk Hammet'}
        >>> use(band, ('name', 'date', 'singer'))
        ['Metallica', None, 'James Hetfield']

    With a non dict data structure::

        >>> from collections import namedtuple
        >>> Person = namedtuple('Person', ('name', 'age', 'gender'))
        >>> alice = Person('Alice', 30, 'F')
        >>> use(alice, ('name', 'gender'))
        ['Alice', 'F']

def use(data, attrs):
    """Return the values of the attributes for the given data

    :param data: the data
    :param attrs: strings
    :returns: a list

    With a dict::

        >>> band = {'name': 'Metallica', 'singer': 'James Hetfield', 'guitarist': 'Kirk Hammet'}
        >>> use(band, ('name', 'date', 'singer'))
        ['Metallica', None, 'James Hetfield']

    With a non dict data structure::

        >>> from collections import namedtuple
        >>> Person = namedtuple('Person', ('name', 'age', 'gender'))
        >>> alice = Person('Alice', 30, 'F')
        >>> use(alice, ('name', 'gender'))
        ['Alice', 'F']

    """
    if isinstance(data, dict):
        if not isiterable(attrs):
            attrs = [attrs]
        coll = map(data.get, attrs)
    else:
        coll = map(lambda x: getattr(data, x), attrs)
    return coll