Python内的center函数
时间:2020-07-19 16:00:15
收藏:0
阅读:89
Center(width,filename):
因为str_test长度为12(包括空格),所以左右填充‘-’的长度一共为8,左右便都填充4个‘-’;如果要填充的filename为单数,则左边填充的filename向下取整,右边填充的向上取整。
评论(0)