"""
Convert Binary to Decimal using Python
"""
binary = int(input())
binary_str = str(binary)
decimal = 0
for i in range(len(binary_str)):
decimal += int(binary_str[i]) * (2**(len(binary_str)-i-1))
print(decimal)
Thanks
On this page of the site you can watch the video online Code 95: Convert Binary to Decimal using Python | 365 Days of Code with a duration of hours minute second in good quality, which was uploaded by the user Code House 19 April 2021, share the link with friends and acquaintances, this video has already been watched 199 times on youtube and it was liked by 2 viewers. Enjoy your viewing!