Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #95823

Re: How to compare lists

Path csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subject:How': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'api,': 0.16; 'hexadecimal': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:compare': 0.16; 'wrote:': 0.16; 'comparing': 0.18; 'changes': 0.20; "aren't": 0.22; 'context.': 0.22; 'trying': 0.22; 'dependent': 0.23; 'matching': 0.23; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'compare': 0.27; 'lists?': 0.29; 'another': 0.32; 'subject:lists': 0.32; 'problem': 0.33; 'largely': 0.33; 'structure': 0.34; 'previous': 0.34; 'lists': 0.34; 'list': 0.34; 'text': 0.35; 'files,': 0.35; 'saved': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'details,': 0.60; 'save': 0.60; 'provide': 0.61; 'subject: ': 0.61; 'more': 0.63; 'within': 0.64; 'online': 0.71; '257': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: How to compare lists
Date Tue, 01 Sep 2015 09:51:04 +0200
Organization None
References <55E54F00.15583.2941C4EC@jana1972.centrum.cz>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host p57bd85a2.dip0.t-ipconnect.de
User-Agent KNode/4.13.3
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.40.1441093876.23514.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1441093876 news.xs4all.nl 23745 [2001:888:2000:d::a6]:39187
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:95823

Show key headers only | View raw


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.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: How to compare  lists Peter Otten <__peter__@web.de> - 2015-09-01 09:51 +0200

csiph-web