Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

generate a list of variables with two indices

Hi

I would like to make a list of variables with two consecutive indices, example rr_10, rr_21 .. etc I tried :

n=3
rrL=list(var('rr_%d%d' %i %(i-1)) for i in [1..n])

without success:not enough arguments for format string what is the missing arguments here ?