Hi my friends. On last result you have a , b , c binary.
>> set('abc') {'a','b','c') >> set(b'abc') {97,98,99} On Jan 3, 2015 10:25 PM, "patrick vrijlandt" <pvrijla...@gmail.com> wrote: > Hello list, > > Let me first wish you all the best in 2015! > > Today I was trying to test for occurrence of a byte in a set ... > > >>> sys.version > '3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:15:05) [MSC v.1600 32 bit > (Intel)]' > >>> 'b' in 'abc' > True > >>> b'b' in b'abc' > True > >>> 'b' in set('abc') > True > >>> b'b' in set(b'abc') > False > > I was surprised by the last result. What happened? > (Examples simplified; I was planning to manipulate the set) > > Patrick > > --- > Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware. > http://www.avast.com > > -- > https://mail.python.org/mailman/listinfo/python-list >
-- https://mail.python.org/mailman/listinfo/python-list