I have a long list of variables to define (~100). Define as follows:
provider = node.xpath("//provider/text()")[0]
language = node.xpath("//language/text()")[0]
subtype = node.xpath("//subtype/text()")[0]
etc...
How would I define it more concisely/DRY, something like -
COLUMN_VARIABLES = ['provider', 'language','subtype']
for variable in COLUMN_VARIABLES:
variable = node.xpath("//%s/text()"%variable)[0]