Subject: Re: [Tutor] Hex to Str - still an open issue Date: Tue, 8 Feb 2005 10:29:07 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
> >>> binary(2) > '00000000000000000000000000000010' > >>> int(00000000000000000000000000000010) > 8 In Python (and most C based languages) a number starting with 0 is assumed to be in octal. so 010 in octal is 8 in decimal. Alan g. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor