list = [] while 1: a = input() if a == '0': break else: list.append(a) str = ' ' print(str.join(list))
相关推荐