| Reply | « Previous Thread | Next Thread » |
|
Hi All,
I am a new in python S60 development, i am also know in python has list or dictionary.but i don't know how to initialize fixed size array in python S60 language. I am aware of c/c++/c# language. such kind of thing in C/ C++ /C# Example : int age[4]; age[0]=23; age[1]=34; age[2]=65; age[3]=74; so please help me how can i initialize above example in python S60. Thanks in advance Pavan Pareta http://www.croozeus.com/started.htm |
| pavan.pareta |
| View Public Profile |
| Find all posts by pavan.pareta |
|
Hi Pavan,
Take a look at the array module, if you are specifically interested in arrrays. In python, we generally deal with lists. Arrays in python are lists with the identical type of elements. Code:
a = array.array('i', xrange(5))
|
|
Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Rafael T.
Offline
Forum Nokia Champion
|
|
|
Quote:
![]() An equivalent example for Python would be: Code:
age = [0 for x in range(4)] age[0] = 23 age[1] = 34 age[2] = 65 age[3] = 74 Rafael.
Last edited by Rafael T. : 2009-01-28 at 06:32.
|
|
One more, much shorter:
Code:
age = [23, 34, 65, 74] ![]() Cheers, --jouni |
|
or you could use
Code:
age = [0]*4 http://igordsm.googlepages.com |
|
Hi All,
Thanks for your replied. This in information is help full for me. ![]() Pavan Pareta http://www.croozeus.com/started.htm |
| pavan.pareta |
| View Public Profile |
| Find all posts by pavan.pareta |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Python for S60 1.4.1 released | jplauril | Python | 30 | 2009-02-07 15:09 |
| What can python do on s60? | iamscuzzo | Python | 2 | 2008-11-06 06:06 |
| S60 IrDA Python Extension (PLEASE HEEEELPPP) | alistair9 | General Symbian C++ | 1 | 2008-06-05 13:18 |
| [announce] the first Mobile Python book is now available ! | cyke64 | Python | 1 | 2008-01-08 10:58 |
| S60 3rd FP1 emulator scn size issues.. | John.Holloway | Symbian Tools & SDKs | 0 | 2007-07-06 15:21 |