Skip to content

Instantly share code, notes, and snippets.

@dapperfu
Created January 24, 2017 19:47
Show Gist options
  • Save dapperfu/020f422da9b5b207121ba7e6fa59fe16 to your computer and use it in GitHub Desktop.
Save dapperfu/020f422da9b5b207121ba7e6fa59fe16 to your computer and use it in GitHub Desktop.
def main():
print("{:3s} {:7s} {:s} {:s}".format("Dec","Float","hex","Hex"))
for count in range(0,256):
print("{0:3d} {0:5.1f} 0x{0:02x} 0X{0:02X}".format(count))
# Main body
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment