The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: comp.lang.python
From: mosscliffe <mcl.off...@googlemail.com>
Date: 26 May 2007 02:54:12 -0700
Local: Sat, May 26 2007 7:54 pm
Subject: Newbie: Struggling again 'map'
I thought I had the difference between 'zip' and 'map' sorted but when
I try to fill missing entries with something other than 'None'. I do not seem to be able to get it to work - any pointers appreciated. Richard lista = ['a1', 'a2'] for x,y in zip(lista, listb): # Fine Truncates as expected for x,y in map(None, lista, listb): # Also fine - extends as for x,y in map("N/A", lista, listb): ########## Fails - Can not call a def fillwith(fillchars): for x,y in map(fillwith("N/A"), lista, listb): ########## Fails also - You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||