Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added my group data structure #2

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion group.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@

# Your code to go here...

my_group =
my_group = { "Jill" : {"age" : 26, "job" : "biologist", "connection" : ["Zalika", "John"]},

"Zaklika" : {"age" : 28, "job" : "artist", "connection" : ["Jill"]},

"John" : {"age" : 27, "job" : "writer", "connection" : ["Jill"]},

"Nash" : {"age" : 34, "job" : "chef", "connection" : ["Zalika", "John"]}}


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestions] Perhaps add a list for the job key value so it can be empty (to represent people without a job). Also, it's good that you added a list for the connection because it can be empty, but you could use a dictionary within this list to give the the type of relation for each connection (to make the connections reciprocal). Well done, though!