Python iterating through object attributes

How do I iterate over an object's attributes in Python?

I have a class:

    class Twitt:
        def __init__(self):
            self.usernames = []
            self.names = []
            self.tweet = []
            self.imageurl = []

        def twitter_lookup(self, coordinents, radius):
            cheese = []
            twitter = Twitter(auth=auth)
            coordinents = coordinents + "," + radius
            print coordinents
            query = twitter.search.tweets(q="", geocode=coordinents, rpp=10)
            for result in query["statuses"]:
                self.usernames.append(result["user"]["screen_name"])
                self.names.append(result['user']["name"])
                self.tweet.append(h.unescape(result["text"]))
                self.imageurl.append(result['user']["profile_image_url_https"])

Now I can get my info by doing this:

    k = Twitt()
    k.twitter_lookup("51.5033630,-0.1276250", "1mi")
    print k.names

I want to be able to do is iterate over the attributes in a for loop like so:

    for item in k:
       print item.names

UPDATED

For python 3, you should use items() instead of iteritems()

PYTHON 2

    for attr, value in k.__dict__.iteritems():
            print attr, value

PYTHON 3

    for attr, value in k.__dict__.items():
            print(attr, value)

This will print

    'names', [a list with names]
    'tweet', [a list with tweet]

From: stackoverflow.com/q/25150955