variable sub in a list- how to

Gabriel Genellina gagsl-py2 at
Fri Jun 22 03:35:40 CEST 2007

En Thu, 21 Jun 2007 22:16:59 -0300, hari sirigibathina  
<hari.siri74 at> escribió:

> How can I substitute a variable into a list ?
> ex:
> list()
> var = 'Prog'
> list.append($Prog) //error occur here

Considering the usage of // and $Prog (btw, did you meant $var?) I think  
you should start by reading some introductory texts, like the Python  
Tutorial <> or Dive Into Python  
<>, to learn how things are done in Python.

Gabriel Genellina

More information about the Python-list mailing list