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

Robert Kern robert.kern at gmail.com
Wed Sep 1 17:39:29 EDT 2010


On 9/1/10 4:32 PM, Stef Mientki wrote:
> 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 ?

http://docs.python.org/py3k/library/stdtypes.html#bytes-and-byte-array-methods
-- 
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
 -- Umberto Eco


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /