Hello, I am doing a problem where I have to convert a random binary input via a string to a integer that is in decimal. I cant seem to figure out how to enter the equation into my function. Which is (((a[0]*2)+a[1])*2+a[2])*2+a[3]... . Currently I am trying to use a loop which goes through every 1 and 0 in the string and converts it into an integer. But after that I just cant think of how to get it to proceed any further along by plugging it into the function.I have tried doing a few things in the loop but none of them have worked so far. Can anyone help or give a hint as to how to let it convert every number in the string to an integer then allow me to input each one into a function?