propertiesTextBlock = """
Basic Properties
----------------
- nodes (n) {n}
- edges (m) {m}
- min. degree {minDeg}
- max. degree {maxDeg}
- isolated nodes {isolates}
- self-loops {loops}
- density {dens:10.6f}
"""
Several data items are inserted using string.format
. Output to console then looks like:
Basic Properties
----------------
- nodes (n) 10680
- edges (m) 24316
- min. degree 1
- max. degree 205
- isolated nodes 0
- self-loops 0
- density 0.000426
Not perfect, because I need to manually insert exactly the right amount of tabs in the text block. Also, what if I want to align the numbers differently (e.g right-justify everything, align at .
...)
Is there an easy way to make sure that this table looks nice?