So I have the following code:
optionlist = [
'<option value="id=%s+%s">%s - %s</option>' %
(x, y, x, y) for x in numlist, y in numlist2
]
What I would like is for the values from x to be inserted in the first %s, values from y to be inserted in the second %s, the same value from x to be inserted in the third, and the same value from y to be inserted in the fourth %s.
1 Answer