Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python check if int


colors = [11, 34.1, 98.2, 43, 45.1, 54, 54]

for x in colors:
    if int(x) == x:
    	print(x)
        
    #or
    if isinstance(x, int):
      	print(x)
    
Source by www.pythonpool.com #
 
PREVIOUS NEXT
Tagged: #python #check #int
ADD COMMENT
Topic
Name
7+6 =