Python Developer

alexel

Regular Member
Joined
Feb 20, 2015
Messages
317
Reaction score
185
Working with ********'s API and I need some help figuring out how to run user defined functions.

Code:
# Get the friends list
    def friends(self):
        friends = []
        for friend in self.updates()['result'].get('friends_response', [])['friends']:
            friends.append(friend['name'])
        return friends

When I run it, it only prints the number of friends, I wish for it to print individual names of friends.
 
Back
Top