[Tutor] Creating an Invalid message for user

Dave Angel davea at davea.name
Sat Apr 12 02:24:00 CEST 2014


Saba Usmani <sabausmani at outlook.com> Wrote in message:
>
> 

You posted in html so I can't quote your code, but why aren't you
 using int() to convert in one call? Second argument is the base
 to be used.

value = int ("10011", 2)

othervalue = int ("234") # default to decimal

-- 
DaveA



More information about the Tutor mailing list