Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python filter list of int and strings

def filter_list(l):
  'return a new list with the strings filtered out'
  return [i for i in l if not isinstance(i, str)]
 
PREVIOUS NEXT
Tagged: #python #filter #list #int #strings
ADD COMMENT
Topic
Name
2+8 =