superpollo wrote: > 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) ?
There are binary number literals since 2.6 and there is the chr() function. >>> print chr(0b1000101) E Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932 -- http://mail.python.org/mailman/listinfo/python-list