ORA-00000 to ORA-00832 ORA-00910 to ORA-01497 24 KUP-00550 to KUP-11012 25 UDE-00001 to UDE-00053 26 UDI-00001 to UDI-00053 27 DBV-00200 to DBV-00200 28 NID-00001 to NID-00604 29 DGM-16900 to DGM-17007 30 LCD-00100 to LCD-00219 31 QSM-00501 to QSM-0
python中有一个zfill方法用来给字符串前面补0,非常有用
view sourceprint?
n = "123"
s = n.zfill(5)
assert s == "00123"
zfill()也可以给负数补0
n = "-123"
s = n.zfill(5)
assert s == "-0123"
对于纯数字,我们也可以通过格式化的方式来补0
n = 123
s = "d" % n
assert s == "00123"
在给介绍介绍下利用Python字符串的zfil