I am trying to find the syntax to print the name of my classes. Given the following:
#!/usr/bin/python
class a:
    whatever  = 0
foo = a()
bar = a()
listOfClasses = [foo,bar]
for l in listOfClasses:
    print l 
    #I'm trying to find the syntax to print the name of the class (eg foo and bar)
locals()dictionary and find values that are instances of the class you want.a. You're trying to find the name of the variable originally assigned, and it's simply not possible.