(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
testList = [1, 4.66, 7, "abc", 5, True, 3.2, False, "Hello", 7] print([x for x in testList if isinstance(x,int) and not isinstance(x,bool)]) [1, 7, 5, 7]