Douglas Soares de Andrade wrote: > Hi ! > > How to work with binary numbers in python ? Is there a way to print a number > in its binary form like we do with oct() or hex() ?
This is a popular topic in the Python Cookbook, maybe one of these recipes will suit you: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/219300 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/111286 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65212 Kent -- http://mail.python.org/mailman/listinfo/python-list