title: How do I test to see if a variable is part of a specific class?
body: <p>Another beginner question that I hope you all could help me with.</p>
  
  <p>I am trying to compare the stats of different cars together. To do so, I separated them all into different classes and now would like to take those classes and compare their numbers together. I think I have a general idea on how to do the actual comparison, but I am wondering how can I test the variable (Or even just have it print out the objects name) to see which variable belongs to which class?</p>
  
  <p>Example the Prius gets 51 miles on the highway, and so it will be the clear winner if I'm trying to find the top mpg vehicle. I'd like to figure out a way to know that I am actually talking about the Prius when I find that number. Maybe like 'Prius: 51 mpg' or something to that manner.</p>
  
  <p>Hopefully, that makes sense. If not, I will clarify to the best of my ability!
  I know that it's probably an easy answer, but for some reason, I can't figure this out...</p>
  
  <p>Thank you all for your help!</p>
  
  <pre><code>class Impala:
      mpg_h = 27
      mpg_c = 17
      fuel_size = 17
  
  class Prius:
     mpg_h = 51
     mpg_c = 48
     fuel_size = 11.9
  
  class CivicHybrid:
     mpg_h = 40
     mpg_c = 45
     fuel_size = 12.3
  
  def top_mpg(*arg):
     high = (max(arg))
  
  top_mpg(Impala.mpg_h, Prius.mpg_h, CivicHybrid.mpg_h)
  </code></pre>
  
  <p>also a bonus question... How would I get my code to automatically input all of the different classes into the function for the fuel size for example? I plan on comparing up to 50 cars at a time, but writing them all in seems like a pain, and that there might be an easier way to do that...</p>