problem is I want to get the MarketIds for the next 10 markets and then get data on them. I need to be able to collect them in a list which I pass to request filters as a string. Market Ids are strings and sometimes have trailling zeros so they must be stored as strings.

If I create an array with the same markets and pass it to requestFilters as a string it fails because it converts double quotes to single quotes,
single quotes remain single quotes,
single + double quotes convert to single + double and not double as I had hoped.
Only double quotes work in requestFilters so I have to get my list to leave each item surrounded by double quotes

Comment

Thanks everyone. You are really quick. No doubt after you had posted your replies I found a solution. Which I set out below. This is essentially betDynamics first solution but it took me a little while to get it to work for the reason given at the end. I will look at json.dumps to understand that and also Liamps library.