1'16'.isdigit()
2>>>True
3
4'3.14'.isdigit()
5>>>False
6
7'Some text'.isdigit()
8>>>False
1
2colors = [11, 34.1, 98.2, 43, 45.1, 54, 54]
3
4for x in colors:
5 if int(x) == x:
6 print(x)
7
8 #or
9 if isinstance(x, int):
10 print(x)
11