def print_num(num):
    ''' Write a numeric result in various forms '''
    out('hex: 0x{0:08x}'.format(num))
    out('dec:   {0:d}'.format(num))
    out('oct: 0o{0:011o}'.format(num))
    out('bin: 0b{0:032b}'.format(num))
def print_num ( num ) : out ( 'hex: 0x{0:08x}' . format ( num ) ) out ( 'dec:   {0:d}' . format ( num ) ) out ( 'oct: 0o{0:011o}' . format ( num ) ) out ( 'bin: 0b{0:032b}' . format ( num ) )
Write a numeric result in various forms