I have a list created by:-

    fld = shlex.split(ln)

It may contain 3, 4 or 5 entries according to data read into ln.
What's the neatest way of setting the fourth and fifth entries to an
empty string if they don't (yet) exist? Using 'if len(fld) < 4:' feels
clumsy somehow.

-- 
Chris Green
ยท
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to