Edited:
I want to generate N-number of agents. Each agent will have a name, so I create a random name from names and assigned it to class Agent.
After I run the
Here's my interpretation of your problem: You're creating a MoneyModel object which contains a collection of MoneyAgent objects stored in a collection-like object referred to as MoneyModel.schedule, and you want a list of the names of each MoneyAgent object within your MoneyModel.schedule collection.
Assuming MoneyModel.schedule behaves as an iterable object, the following should work:
atr = [agent.name for agent in gow.schedule]