Path: csiph.com!goblin1!goblin2!goblin.stu.neva.ru!hulme.interac.it!bofh.it!tornado.fastwebnet.it!53ab2750!not-for-mail Subject: Re: Iterazione Python References: <572CF68F.2080600@smith.it> Newsgroups: it.comp.lang.python From: Smith Message-ID: <572E3BE4.1070507@smith.it> User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Lines: 19 Date: Sat, 7 May 2016 21:03:00 +0200 NNTP-Posting-Host: 93.34.176.20 X-Complaints-To: newsmaster@fastweb.it X-Trace: tornado.fastwebnet.it 1462647780 93.34.176.20 (Sat, 07 May 2016 21:03:00 CEST) NNTP-Posting-Date: Sat, 07 May 2016 21:03:00 CEST Xref: csiph.com it.comp.lang.python:7655 On 06/05/2016 22:12, Andrea D'Amore wrote: > On 2016-05-06 19:54:55 +0000, Smith said: > >> Se provo con zip() : >> >> numbers = [1,2,3,4,5] >> letters = ["A", "B", "C"] >> for x,j in zip(numbers,letters): >> print(x,j) >> >> Non mi restituisce le due liste complete: > > E fa bene, le due liste sono di lunghezza diversa. > > Cerca il package itertools nella stdlib. > > Grazie Andrea.