if/else in a list comprehension
How can I do the following in Python? row = [unicode(x.strip()) for x in row if x is not None else ”] Essentially: replace all the Nones with empty strings, and then carry out a function. 12 You can totally do that. It’s just an ordering issue: [unicode(x.strip()) if x is not None else ” … Read more