How can I check if the elements of a list are of the same type, without checking individually every element if possible?
For example, I would like to have a function
I prefer to use map for a case like this:
from types import IntType In [21]: map((lambda x: isinstance(x, IntType)), x) Out[21]: [True, False, False]