You can use the `hostlist` class to convert it to an iterable list. e.g.
>>> import pyslurm
>>> nodes = 'foo-bar-[686-687]'
>>> hl = pyslurm.hostlist()
>>> hl.create(nodes)
>>> hl.get_list()
['foo-bar-686', 'foo-bar-687']
>>> hl.destroy()
Perhaps PySlurm should offer this automatically and provide two attributes, node_list_str and node_list, so you wouldn't have to do this manually.
Giovanni