| Reply | « Previous Thread | Next Thread » |
|
1.How do we convert a tuple into a list .
I tried using list function but it did not work. 2. Is there any documenatation where we can check the syntax . 3. How do I create a 2D array. 4. l =[u"a",u"b"] t=[0,1] for i in t print l[i] it gives an error Why? Please help . |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Online
Forum Nokia Champion
|
|
1. The list function seems to work actually.
Code:
>>> a=(1,2,3) >>> b=list(a) >>> b [1, 2, 3] 2. Check the syntax of what? Python in general? If so, see this. 3. A 2D array is basically an array of arrays. So something like this: Code:
1 2 3 4 5 6 7 8 Code:
array=[[1,2,3,4],[5,6,7,8]] Code:
l=[u"a",u"b"] t=[0,1] for i in t: print l[i] |
|
Quote:
Thank you very much for your prompt reply 1. I tried it in S60 emulator , it did not work there . Do we have to import a special module for it . 2. I checked the website . How can we get a syntax of a function and its uses in python 3. How do we implement 2D array of strings . 4. You were correct . I forgot the colon . |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Online
Forum Nokia Champion
|
|
hi kar2905
welcome to the forum nokia python dibo. you can look at he syntax part in the mobapps.org it contains a limited information about syntax now but i am soon planning to add a lot. So keep a watch Enjoy Pythoning Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Online
Forum Nokia Champion
|
|
|
Quote:
![]() Enjoy Pythoning ![]() Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Online
Forum Nokia Champion
|
|
|
Quote:
2. This article explains function syntax. 3. Simply replace the numbers with strings. |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Online
Forum Nokia Champion
|
|
hi kar2905
chintan has just framed a new article at the wiki have a look at this it will really help you. Enjoy Pythoning Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |