Declaring array of Variables ?
clp2 at rebertia.com
Sun Sep 13 07:06:46 CEST 2009
On Sat, Sep 12, 2009 at 9:51 PM, Lennyboi <leonidas01.rei at gmail.com> wrote:
> Can I declare an array of variables in python like in C
> int p;
> I looked everywhere, but I don't find any mention of it.
Python doesn't have C-like variable declarations, and it does not have
arrays of static length.
The closest you can get is a list prefilled with certain number of
duplicates of a certain value.
p =  * 10
or for non-numbers:
p = [None] * 10
More information about the Python-list