I have a nested dictionary of people and item ratings, with people as the key. people may or may not share items. Example:
{
\'Bob\' : {\'item1\':3, \'item2
This is easy enough to do (as others have shown), but depending on your needs you should also consider that for data with several pieces of information where you want to extract by any criterion, a database might be the best tool. The built-in sqlite3 module provides a low-overhead database that may, depending on what you are doing, serve you better than a nested dict.