Improved printing

This commit is contained in:
2022-10-29 13:25:37 -07:00
parent 81c78d7921
commit 09f78a7642
6 changed files with 71 additions and 17 deletions

View File

@@ -70,4 +70,35 @@ def show_greeting():
"<_s> A λ calculus engine</_s>",
"<_p> Type :help for help</_p>",
""
])), style = style)
])), style = style)
def subscript(num: int):
sub = {
"0": "",
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"6": "",
"7": "",
"8": "",
"9": ""
}
sup = {
"0": "",
"1": "¹",
"2": "²",
"3": "³",
"4": "",
"5": "",
"6": "",
"7": "",
"8": "",
"9": ""
}
return "".join(
[sup[x] for x in str(num)]
)