|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
Quote:
um...... considering strings are char array (or array/list of char?) in C/C++ you will get string arrays as array/list of string or array/list of (array/list of char), in simpler term = 2 Dimention array of char string array was how my Software Development lecturer used to describe "array of (array of char)" by the way, how do I define a multi-dimention array? in VB dim my2DAry as Integer(,) = {{1,2},{3,4}} in C++ int my2DAry[2][2] = {{1,2},{3,4}}; in C# int[,] myArray = new int[,] {{1,2},{3,4}}; what about Python? |
|
#17
|
||||
|
||||
|
Ah ok, so if i understand you a string array is a list of strings like..
>>> array = ['this', 'is', 'a', 'string', 'array'] >>> array ['this', 'is', 'a', 'string', 'array'] >>> have I got it? multi-dimention lists/arrays in Python are really easy.. myarray = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]] and accessing these lists/arrays is even simpler.. myarray[0][0] = 1 and myarray[1][2] = 11 Theres more about this at http://forums.devshed.com/t77039/s.html Mark. |
|
#18
|
|||
|
|||
|
thanks netytan for the muti-D list/array
and yes, string array(list) an array(list) of string ['row1', 'row2', 'row3'] |
|
#19
|
|||
|
|||
|
Re: array of array, etc.
Similar to how a numbers are defined: A number is defined to be a plurality of a plurality of a plurality, according to Frege. ![]() |
|
#20
|
||||
|
||||
|
Ah gotcha guys, everything up till percivall used the long words lol, seriosuly dude, is that a real word or did we just make it up
![]() Anyway I get the whole string array thing, really isn't that hard ![]() Thanks, Mark. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > open file in append mode |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|