python3 รูปแบบผู้นำ 0
print(f"{1:02d}")
พิมพ์สองตัวเลขรูปแบบภาษาไพธอน
# Call str. format(number) with "{:. 2f}" as str and a float as number to
# return a string representation of the number with two decimal places.
# Call print(string) with the formatted float-string as string to print the float.
print("{:. 2f}".format(number))
ปลั๊กอินสำหรับไพธอนเป็นไงเพื่อทำให้จำนวนเต็มแสดงตัวเลข 2
print("{:0*number of characters here*d}".format(my_integer))
# Example with two characters, one of which is a leading zero
print("{:02d}".format(2))