but then i get :

 >>> m
66
 >>> n=int(hex(m))
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
ValueError: invalid literal for int(): 0x42
 >>>

what am I missing here ?
thank you
Tim

avnit wrote:

>If you just want to convert a string to an integer, it would be:
>
>  
>
>>>>int(n)
>>>>        
>>>>
>
>in your case it would be:
>
>  
>
>>>>m=66
>>>>n=int(hex(m))
>>>>        
>>>>
>
>  
>


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to