[Tutor] Concatenating string
Francesco Loffredo
fal at libero.it
Wed Feb 23 11:48:24 CET 2011
On 23/02/2011 3.02, tee chwee liong wrote:
> hi Francesco,
>
> couldnt get hex of bin working on IDLE Python 2.5 when i type:
>
> >>> hex(0b1001001001001001001)
> SyntaxError: invalid syntax
> >>> bin(0x49249)
> Traceback (most recent call last):
> File "<pyshell#126>", line 1, in <module>
> bin(0x49249)
> NameError: name 'bin' is not defined
>
> pls advise.
Python 2.5 had no built-in binary conversion tools. bin() was introduced in 2.6.
The interesting questions are:
1- are you SURE you were using 2.5 yesterday?
If so:
2- did you import some modules? Which ones?
On my phone I have Python 2.5 too, and it gives the same errors to me.
Is it possible that you upgrade to 2.6 or 2.7 ?
>
> thanks
> tcl
You're welcome!
FAL
-----
Nessun virus nel messaggio.
Controllato da AVG - www.avg.com
Versione: 10.0.1204 / Database dei virus: 1435/3460 - Data di rilascio: 22/02/2011
More information about the Tutor
mailing list