r/pythonhelp • u/Neat_Chip4684 • Aug 31 '21
HOMEWORK Help with Python exponential function
So, I started my coding adventure yesterday and started from "4 hours full course for beginners of python". I had problems understanding how below code works, it's exponential function and I can't really understand It.After defining a function, we make container called "result" where we store below list of numbers and I can't understand how its gonna make 2^3=8? How can list of numbers be multiplied by 2? Someone can help?


3
Upvotes
2
u/Neat_Chip4684 Aug 31 '21
After each iteration integer "result" gets multiplied and after each multiplication it changes from 1 to 2, from 2 to 4 and from 4 to 8?