Improved printing
This commit is contained in:
@@ -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)]
|
||||
)
|
||||
Reference in New Issue
Block a user