Python Code to Convert Binary to Decimal Without Inbuilt Function
binary_str = input('Enter a Binary number to convert it to Decimal: ')
digit_list = list(binary_str)
digit_list.reverse()
sum = 0
for digit in (range(len(digit_list))):
sum = sum + int(digit_list[digit]) * pow(2, digit)
print(sum)