Use .precision instead: >>> '{:5.5}'.format('aaabbbccc') 'aaabb'. According to the documentation of the Format Specification Mini-Language:.
確定! 回上一頁