krishna wrote: > I need to convert 1010100110 boolean value to some think like 2345, if > its possible then post me your comment on this
Yes, sure. You can simply sum up the digit values and then format them as decimal number. You can also just look up the number: def decode_binary(input): for i in range(2**len(input)): if bin(i)==input: return str(i) I Hope I was able to help you with your homework! ;^) Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932 -- http://mail.python.org/mailman/listinfo/python-list