“Discord Table Generator” Code-Antworten

Tabelle in Markdown

Colons can be used to align columns.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3
Charred Dolphin

Discord Table Generator

# pip install -U 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"],
)

await ctx.send(f"```\n{output}\n```")

╔═════════════════════════════╗
║  #     G     H     R     S  ║
╟─────────────────────────────╢
║  1    30    40    35    30  ║
║  2    30    40    35    30  ║
╟─────────────────────────────╢
║ SUM   130   140   135   130 ║
╚═════════════════════════════╝
DenverCoder1

Discord Table Generator

ihioh

ipoh
h
pih
pi
hp
ihphipohh
iiph
ihph
hhpohp
hpohpohphphp
h
ph
ph
ppohp
h
p
Lonely Lizard

Ähnliche Antworten wie “Discord Table Generator”

Fragen ähnlich wie “Discord Table Generator”

Weitere verwandte Antworten zu “Discord Table Generator” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen