How to print the ASCII hexadecimal digits in Python

2 Answers

0 votes
import string  

print (string.hexdigits);


    
'''
run:

0123456789abcdefABCDEF

'''

 



answered May 16, 2019 by avibootz
0 votes
import string  
 
for ch in string.hexdigits:
    print(ch)
 
 
     
'''
run:
 
0
1
2
3
4
5
6
7
8
9
a
b
c
d
e
f
A
B
C
D
E
F

'''

 



answered May 17, 2019 by avibootz

Related questions

...