Created
January 20, 2023 22:01
-
-
Save konverner/daf8b557ab8572cbff53c8e52ae8aa36 to your computer and use it in GitHub Desktop.
alignment and precision in python string formatting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 12 space symbols to left and 2 numbers after a decimal point | |
print("{:>12.2f} {:>12.2f}".format(1.32342, 1.9121)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment