Peter Machell wrote: > I can almost do it this way: > > for x in bar: > fname = x[0] > if fname == "": > fname == "None" > sname = x[1] > if sname == "": > sname == "None" > > print "<FNAME>"+fname+"</FNAME>"+"<SNAME>"+sname+"</SNAME>"
for this: for row in bar: print "<FNAME>%s</FNAME><SNAME>%s</SNAME>" % ( row[0] or 'None', row[1] or 'None') > Except that I should be using a list and loop to do the null checking, > and it still stops when (I think) it hits a blank value: > TypeError: cannot concatenate 'str' and 'NoneType' objects What's the data and program that does that? --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list