brands = ['budwiser','miller','carlsburg'] for brand in brands: bottle = [brand] print getattr(bottle['budwiser'],price)