title: Check if all elements of a list are of the same type
body: <p>How can I check if the elements of a list are of the same type, without checking individually every element if possible?</p>
  <p>For example, I would like to have a function to check that every element of this list is an integer (which is clearly false):</p>
  <pre><code>x = [1, 2.5, 'a']
  
  def checkIntegers(x):
      # return True if all elements are integers, False otherwise
  </code></pre>