Python what's the data structure for triple data
Posted
by Paul
on Stack Overflow
See other posts from Stack Overflow
or by Paul
Published on 2010-06-17T17:46:23Z
Indexed on
2010/06/17
17:53 UTC
Read the original article
Hit count: 207
python
|data-structures
I've got a set of data that has three attributes, say A, B, and C, where A is kind of the index (i.e., A is used to look up the other two attributes.) What would be the best data structure for such data?
I used two dictionaries, with A as the index of each. However, there's key errors when the query to the data doesn't match any instance of A.
© Stack Overflow or respective owner