converting from perl: variable sized unpack

Roy Smith roy at panix.com
Sat Jul 14 09:52:19 EDT 2001


James Logajan <JamesL at Lugoj.Com> wrote:
> This may not be the most elegant or efficient, but how about this:
> 
> [f1, f2, f3, f4, f5, f6] = (string.split (line) + 6*[None])[:6]

Yeah, that's what I had come up with, but I was hoping somebody would have 
an idea that was more elegant and efficient :-)



More information about the Python-list mailing list