From: Neil Cerutti on
On 2010-06-18, Jon Clements <joncle(a)googlemail.com> wrote:
>> I just wondered if something smoother was available.
>
> In terms of behaviour and 'safety', I'd go for:
>
>>>> rec = { 'code1': '1,2,3', 'code2': '' }
>>>> next(csv.reader([rec['code1']]))
> ['1', '2', '3']
>>>> next(csv.reader([rec['code2']]))
> []

Slick!

--
Neil Cerutti