(python 2.7.8)
I\'m trying to make a function to extract integers from a mixed list. Mixed list can be anything but the e.g. I\'m going with is:
test
as explained by @pts for isinstance, so use type like this
type
[ x for x in testList if type(x)==int ]
output:
[1, 7, 5, 7]
use set to remove duplication
set