Groleo Marius wrote:
I have the folowing code:
 c=2
 e=3
 s="12"
 code.append('funtion ("c, e,s")')
 print "\n".join(code) + '\n'

The problem is when i call append.
The variables s, c, e are not replaced with their value, so in the end
i get the result:

funtion(" c, e, s");

The result that i want is :
funtion("2,3,12");




I don't know exactly what you want, but try this:

>>> code.append('funtion ("%s, %s,%s")' % (c, e, s))
>>> print "\n".join(code) + '\n'
funtion ("2, 3,12")


HTH,

Arjen
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to