total = [] def new_input(): while True: unit= input("请输入:") if unit== 'q': break else: total.append(unit) print(total) print(new_input())