自定义一个函数输出list,用空格代替逗号:
def printlist(lst): lst = [str(x) for x in lst] print (' '.join(lst))a = ['zhan', 123]printlist(a)