I'm looking for a way to assign a variable to a specific list item by having the same . Here is my code to enlighten things.
count = 0
beer = 5/100
maltbeer = 7/100
tablewine = 12/100
fortifiedwine = 17/100
aperitif = 24/100
spirits = 40/100
percentageCalc = 0
for i in drinks:
count =+ 1
percentageCalc = percentageCalc + drinks[count]
The drinks are inputed into drinks and can vary depending on what was inputed.
i.e: drinks = ['beer', 'beer', 'spirits', 'maltbeer']
drinks is appended inputs only accepted as one of the variables seen further up.