I want to create this tuple:
a=(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6),(7,7,7),(8,8,8),(9,9,9)
I tried with this
a=1,1,
A little experimentation got this working. I guess you need a comma after the tuple in a to convince python it is a tuple.
a = ((1,1,1),) for i in range(2, 10): a = a + ((i,i,i),) print(a)