You can download this code by clicking the button below.
This code is now available for download.
This function takes a string as an argument and returns a list of ASCII values for each character in the string.
Technology Stack : String
Code Type : String processing
Code Difficulty : Beginner
def ascii_table(text):
"""
输出给定文本的ASCII码表。
"""
result = ""
for char in text:
result += f"{ord(char):4} "
return result