title: Python: determine if all items of a list are the same item
body: <p>In some of my code I put a series of objects in a list and I build an additional list out of  their attributes, which is a string. I need to determine if all the items in this second list have the exact same value, without knowing beforehand which value it is, and return a bool so that I can do different things in my code depending on the result.</p>
  
  <p>I can't know the names of the properties beforehand, that is why I'm trying to make something as generic as possible.</p>
  
  <p>To make the example clear, an ideal function, called "all_same" would work like this:</p>
  
  <pre><code>&gt;&gt;&gt; property_list = ["one", "one", "one"]
  &gt;&gt;&gt; all_same(property_list)
  True
  &gt;&gt;&gt; property_list = ["one", "one", "two"]
  &gt;&gt;&gt; all_same(property_list)
  False
  </code></pre>
  
  <p>I was thinking of making a list of unique elements and then check if its length is 1, but I'm not sure if it's the most elegant solution out there.</p>