Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.python > #7651
| From | Andrea D'Amore <anddam+NOSPAM@brapi.net> |
|---|---|
| Newsgroups | it.comp.lang.python |
| Subject | Re: Iterazione Python |
| Date | 2016-05-06 17:19 +0200 |
| Organization | C.U. srl News Server |
| Message-ID | <ngicl7$85h$1@virtdiesel.mng.cu.mi.it> (permalink) |
| References | <tW1Xy.44957$pt.24847@tornado.fastwebnet.it> |
On 2016-05-06 14:32:57 +0000, Smith said: > vorrei sapere perchè questo script non funziona: > > numbers = [1,2,3,4,5] > letters = ["A", "B", "C"] > for x,j in map(None,numbers,letters): > print(x,j) Perché stai usando None come primo argomento di map(), quindi map cerca di chiamare None ma questo non ha l'attributo '__call__' e quindi non è chiamabile come funzione, infatti hai: > TypeError: 'NoneType' object is not callable -- Andrea
Back to it.comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Iterazione Python Smith <smith@smith.it> - 2016-05-06 16:32 +0200
Re: Iterazione Python Andrea D'Amore <anddam+NOSPAM@brapi.net> - 2016-05-06 17:19 +0200
Re: Iterazione Python Smith <smith@smith.it> - 2016-05-06 21:54 +0200
Re: Iterazione Python Andrea D'Amore <anddam+NOSPAM@brapi.net> - 2016-05-06 22:12 +0200
Re: Iterazione Python Smith <smith@smith.it> - 2016-05-07 21:01 +0200
Re: Iterazione Python Smith <smith@smith.it> - 2016-05-07 21:03 +0200
Re: Iterazione Python Smith <smith@smith.it> - 2016-05-08 12:36 +0200
csiph-web