[Baypiggies] Input in hex format
cvrebert at gmail.com
Thu Aug 14 23:30:59 CEST 2008
hex_num = int(raw_input("prompt here"), 16) #allows optional leading 0X or 0x
binary_num = int(raw_input("prompt here"),2)
num = int("number as string", base)
Follow the path of the Iguana...
On Thu, Aug 14, 2008 at 2:23 PM, David Elsen <elsen.david08 at gmail.com> wrote:
> Greetings all,
> One very simple question please.
> I want to assign hex value to one of my class field.
> Can someone please tell me how can give hex and binary input to one of my
> class field?
> By default, it is taking in decimal and that is expected. After all code
> should be for human not for machines.
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
More information about the Baypiggies