from collections import namedtuple
Animal = namedtuple('Animal',
[ 'species', 'name', 'call' ])
zoo = [
Animal('dog', 'Spotty', 'woof'),
Animal('dog', 'Fido', 'grrrr')
]
def everyone(group):
for a in group:
print("%s: %s" % (a.name, a.call))
everyone(zoo)