Public
Authored by Jordan ERNST

[Python3] Formatting strings by columns

Formatted strings f"string" replace .format() method. Works only, from Python 3.6 !

  • < : Align to the left (Default)
  • ^ : Center
  • > : Align to the right

Output of the following code :

Number        Name           Price by kg
1           Raspberry              0.81€
2            Banana                1.21€
Edited
String_formatting_columns.py 208 Bytes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment