what is this kind of string: b'string' ?

Martin v. Loewis martin at v.loewis.de
Sat Sep 4 18:52:15 CEST 2010


Am 01.09.2010 23:32, schrieb Stef Mientki:
>  in winpdb I see strings like this:
> 
>>>> a = b'string'
>>>> a
> 'string'
>>>> type(a)
> <type 'str'>
> 
> what's the "b" doing in front of the string ?

It's redundant.

Regards,
Martin



More information about the Python-list mailing list