Python输入一行整形或者浮点型到一个列表中: 方案一:先输入为字符串列表,再逐个转换为int或float l = input().split() for i in range(len(l)): l[i] = int