python实现华为机试题-连续输入字符串,按照长度8拆分,输出到新的数组,长度不是8整数倍的字符串后面补0,空字符串不处理

def printStr(string):
    if len(string)<=8:
        print(string+"0"*(8-len(string)

猜你喜欢

转载自blog.csdn.net/HBT036017/article/details/106807747
今日推荐