# %d的使用方法
num = 1024
print("number = %d."%num)	#number = 1024.
print("number = %3d."%num)	#number = 1024.
print("number = %5d."%num)	#number =  1024.
print("number = %05d."%num)	#number = 01024.
print("number = %-7d."%num)	#number = 1024   .
#总长位可以用来补０也可以用来补空格，但在数字的右侧补０，相当于不补，需要用空格来表示。（只能在右侧补空格）
print("number = %-07d."%num)	#number = 1024000.--->number = 1024   .
print("number = %07d."%num)	#number = 0001024.
print(" __分割线__")
print("number = %.3d."%num)    #截取位只能用来补０不存在补空格的情况。number = 1024.
print("number = %.03d."%num)	#number = 1024.
#print("number = %.-5d"%num)　　#并且截取位只能在左侧补０，不可以在右侧补０
print("number = %.5d."%num)	#number = 01024.
print("number = %.05d."%num)	#number = 01024.
#print("number = %.-05d"%num)
print("__fengexian__")
print("number = %1.5d"%num)	#number = 01024
print("number = %1.3d"%num)	#number = 1024
print("number = %5.3d"%num)	#number =  1024
print("number = %7.6d"%num)	#number =  001024
print("number = %07.06d"%num)	#number = 0001024
print("number = %07.6d"%num)	#number = 0001024
print("number = %7.06d"%num)	#number =  001024
print("number = %01.03d"%num)	#number = 1024
