Consider this code
description = ""
desc = hxs.select('/html/head/meta[2]/@content').extract()
if len(desc) > 0:
description = desc[0]
item["description"] = description
desc is a list of strings. If list is empty description is an empty string, if not it's the first elements from the list. How to make it more pythonic?
Forgot to mention that I have to use 2.7