Question : number formatting with format()
Answered by : encouraging-eland-eofwinoenzrz
# d, f, b and h are types
# integer
print(format(12, "d"))
# float arguments
print(format(123.4567898, "f"))
# binary format
print(format(12, "b"))
# hexadecimal format
print(format(12, "x"))
Source : https://hackmd.io/Ui7XtIb2Tsq7zORMDih6GQ | Last Update : Mon, 22 Nov 21