Skip to content

Commit f4f5820

Browse files
authored
Update hexspeak.py
1 parent a2a97f5 commit f4f5820

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/hexspeak.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ def toHexspeak(self, num):
77
:type num: str
88
:rtype: str
99
"""
10-
n = int(num)
1110
lookup = {0:'O', 1:'I'}
1211
for i in xrange(6):
1312
lookup[10+i] = chr(ord('A')+i)
1413
result = []
14+
n = int(num)
1515
while n:
1616
n, r = divmod(n, 16)
1717
if r not in lookup:

0 commit comments

Comments
 (0)