①使用 := 海象运算符 while n := input(): print(n) 可在表达式内部为变量赋值。Python3.8 版本新增运算符。 ② 使用try catch 捕获一个输入否则break