hi guys, i need to print the ASCII tabel using only the control staments; the unprintable characters need to be represented by the ASCCII name or a. any ideas that may help?
is the ASCII table define in paython?
Raulito
0
Newbie Poster
Recommended Answers
Jump to Post>>> chr(45)
'-'
>>> ord('a')
97
>>>
Jump to PostThe simplest way is to use the dictionary:
# print the control characters of an ASCII table ... controls_dic = { 1: 'SOH', 2: 'STX', 3: 'ETX', 4: 'EOT', 5: 'ENQ', 6: 'ACK', 7: 'BEL', 8: 'BS', 9: 'HT', 10: 'LF', 11: 'VT', 12: 'FF', 13: 'CR', …
Jump to PostThere is a slight flaw in ZZucker's post, but the OP should have reason this out for themselves.
All 12 Replies
jrcagle
77
Practically a Master Poster
bumsfeld
413
Nearly a Posting Virtuoso
jrcagle
77
Practically a Master Poster
Ryanvh
0
Newbie Poster
jrcagle
77
Practically a Master Poster
Ryanvh
0
Newbie Poster
Ryanvh
0
Newbie Poster
ZZucker
342
Practically a Master Poster
woooee
814
Nearly a Posting Maven
sneekula
commented:
good eyes
+3
ZZucker
342
Practically a Master Poster
Ryanvh
0
Newbie Poster
Ryanvh
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.