python实现对指定字符串补足固定长度倍数分组输出
# 把一个字符串按给定长度拆分; # 长度不是给定长度整数倍的字符串在后面补数字0。from textwrap import wrapwidth = 8text = 'urivthvtlqqerctlxmjvkgvfclaaduwmaadedpadanl'print '
'.join(wrap(text + '0'*(width-len(text) % width), w
'.join(wrap(text + '0'*(width-len(text) % width), w