Given a list containing integers :
>>> print mylist
[0, 1, 2]
Can I calculate the sum of 2^0 + 2^1 + 2^2
? the base number (2) is fixed, it does not change, I'm just using the elements of list as exponents
related doubts :
Is a list suitable for what I'm trying to do?