how to create binary to decimal converter in python