Tried to implement List comprehension in Python 3.7x with following example
a_list = [1, ‘4’, 9, ‘a’, 0, 4]
squared_ints = [ e**2 for e in a_list if type(e) == types.IntType ]
However it fails with the below error
NameError: name 'types' is not defined
Can anyone help me on this ?