7-2 格式化输出字符串,控制长度,右边对齐,不足补星号
格式化输出字符串,控制长度为8个字符,右边对齐,不足补星号
输入格式:字符串 abc输出格式: abc
s=input('输入字符串:') print(s.rjust(8,'*'))
超过8个字符咋办?