First time here? Check out the FAQ!
answered 2010-12-15 10:16:19 +0100
If I correctly understand your question, dictionaries can do this. You just need to use tuples as keys. Example:
sage: m = {} # an empty dictionary sage: m[('Cathy', 19)] = '555-1212' sage: m[('Cathy', 19)] '555-1212'