Filling in a tuple from unknown size list

John Machin sjmachin at
Sat Nov 28 01:02:39 CET 2009

On Nov 27, 11:18 pm, boblatest <boblat... at> wrote:
> Hello all,
> (sorry for posting from Google. I currently don't have access to my
> normal nntp account.)
> Here's my question: Given a list of onknown length, I'd like to be
> able to do the following:
> (a, b, c, d, e, f) = list
> If the list has fewer items than the tuple, I'd like the remaining
> tuple elements to be set to "None". If the list is longer, I'd like
> the excess elements to be ignored.

WRONG -- sweeping excess input under the carpet is a nasssssty perlish

More information about the Python-list mailing list