Answers for "python convert ascii table"

2

table to ascii python

# pip install table2ascii (https://pypi.org/project/table2ascii)
from table2ascii import table2ascii

output = table2ascii(
    header=["#", "G", "H", "R", "S"],
    body=[["1", "30", "40", "35", "30"], ["2", "30", "40", "35", "30"]],
    footer=["SUM", "130", "140", "135", "130"],
)

print(output)

"""
╔═════════════════════════════╗
║  #     G     H     R     S  ║
╟─────────────────────────────╢
║  1    30    40    35    30  ║
║  2    30    40    35    30  ║
╟─────────────────────────────╢
║ SUM   130   140   135   130 ║
╚═════════════════════════════╝
"""
Posted by: Guest on June-01-2021
1

convert characters in ascii in python

# Program to find the ASCII value of the given character

c = 'A'
print("The ASCII value of '" + c + "' is", ord(c))
Posted by: Guest on December-05-2020

Python Answers by Framework

Browse Popular Code Answers by Language