# # Torbert, 4 Sept 2014 # from pickle import dump # # build neighbor lists... # ht = { 'metric' : [] } # ht['bottle'] = [ 'battle' ] ht['battle'] = [ 'bottle' , 'cattle' , 'rattle' ] ht['castle'] = [ 'cattle' ] # ht['cattle'] = [] ht['cattle'] . append( 'battle' ) ht['cattle'] . append( 'castle' ) ht['cattle'] . append( 'rattle' ) # # save for later... # fout = open( 'nbrs.pkl' , 'wb' ) # dump( ht , fout , protocol = 2 ) # fout.close() # # end of file #