On Thu, Jun 13, 2013 at 5:42 PM, Νικόλαος Κούρας <supp...@superhost.gr> wrote: > On 13/6/2013 10:11 πμ, Steven D'Aprano wrote: >> No! That creates a string from 16474 in base two: >> '0b100000001011010' > > I disagree here. > 16474 is a number in base 10. Doing bin(16474) we get the binary > representation of number 16474 and not a string. > Why you say we receive a string while python presents a binary number?
You can disagree all you like. Steven cited a simple point of fact, one which can be verified in any Python interpreter. Nikos, you are flat wrong here; bin(16474) creates a string. ChrisA -- http://mail.python.org/mailman/listinfo/python-list