mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 19:03:15 +01:00
If hex converted had a 1 in the MSB, an L was appended to the number. The conversion routine removes this.
10 lines
183 B
Python
10 lines
183 B
Python
#! /usr/bin/env python2.6
|
|
# -*- mode: python; coding: utf-8; -*-
|
|
#
|
|
|
|
def conv_hex(val):
|
|
hexval = hex(val)
|
|
if hexval[-1:] == 'L':
|
|
hexval = hexval[:-1]
|
|
return hexval
|