📅  最后修改于: 2022-03-11 14:47:24.499000             🧑  作者: Mango
In [3]: lst = (1,2,3)
In [4]: all(isinstance(n, int) for n in lst)
Out[4]: True
In [5]: lst = (1,2,'3')
In [6]: all(isinstance(n, int) for n in lst)
Out[6]: False