my list looks like:
lst
['78251'],
['18261'],
['435921'],
['74252'],
...]
I want to place that numbers into a url code http://api.brain-map.org/api/v2/data/query.xml?criteria=model::SectionDataSet,rma::criteria,[failed$eq%27false%27],products[abbreviation$eq%27Mouse%27],genes[entrez_id$eq%27inhere%27]'
I tried
for i in lst:
b = 'http://api.brain-map.org/api/v2/data/query.xml?criteria=model::SectionDataSet,rma::criteria,[failed$eq%27false%27],products[abbreviation$eq%27Mouse%27],genes[entrez_id$eq%27%d%27]' %i
I get no error message but it says
b
Traceback (most recent call last):
File "<ipython-input-79-89e6c98d9288>", line 1, in <module>
b
NameError: name 'b' is not defined
So I think the difficult part is that there is no space in between the string... How can I handle this?
bin your code. There is nobvariable in what you've included. It seems you've entered aband pressed enter from your error message.