How to compare lists

Peter Otten __peter__ at web.de
Tue Sep 1 03:51:04 EDT 2015


Jahn wrote:

> 1.
> How can I save 256 lists, each list has 32 values( hexadecimal numbers)
> 2.
> How to compare the saved lists with another 256 lists ( that are read
> online and have the same structure as the list one)?
> ( the first list must be saved in the  previous step)

You are giving details, but they aren't significant. You can save 256 lists 
with 32 numbers just like you would save 257 or 2560 with 23 numbers. How 
you should save them is largely dependent on how you are using them later. 
Simple methods are pickle.dump() or json.dump().

But what is the problem you are trying to solve by comparing these lists? 
Are you just looking online for lists matching the local ones? Do you want 
to find missing/extra lists? Or are you even looking for changes within the 
lists? 

How are the online lists provided? Are they text files, is there an API, or 
do you have to screenscrape them from web pages?

Please provide a little more context.




More information about the Python-list mailing list