V
Vineet Jain
I'm not sure I understand why [1]*4 and (1)*4 work differently? [1]*4
results in [1, 1, 1, 1] while (1)*4 results in 4. There are times when I
have to do the following:
'%s some value %s and some other text %s' % (a)*3
as apposed to
'%s some value %s and some other text %s' % (a, a, a)
In this case I always end up doing
'%s some value %s and some other text %s' % [a]*3
VJ
results in [1, 1, 1, 1] while (1)*4 results in 4. There are times when I
have to do the following:
'%s some value %s and some other text %s' % (a)*3
as apposed to
'%s some value %s and some other text %s' % (a, a, a)
In this case I always end up doing
'%s some value %s and some other text %s' % [a]*3
VJ