binary literal

Terry Reedy tjreedy at udel.edu
Wed Jul 22 18:28:04 CEST 2009


superpollo wrote:
> hello clp.
> 
> i can insert a hex value for a character literal in a string:
> 
>  >>> stuff = "\x45"
>  >>> print stuff
> E
>  >>>
> 
> can i do something like the above, but using a *binary* number? (e.g. 
> 00101101 instead of 45) ?

Language Ref 2.4. Literals




More information about the Python-list mailing list