Python字符串格式化有两种实现方式:字符串格式化表达式,字符串格式化方法(函数)。1、字符串格式化表达式%[(name)][flag][width][.precision]typecode2、字符串格式化方法{filename!conversionflag:formatspec}formatspec格式:[[fill]align][sign][#][0][width][.precision][typecode] 赞微海报分享
近期评论