You can download this code by clicking the button below.
This code is now available for download.
Converts a string into a dictionary of ASCII code values.
Technology Stack : No packages
Code Type : Function
Code Difficulty : Beginner
def ascii_table(text):
"""
Convert a string into an ASCII table representation.
"""
ascii_table = {}
for char in text:
if char not in ascii_table:
ascii_table[char] = ord(char)
return ascii_table