Return
Styles:
Pseud0ch
,
Terminal
,
Valhalla
,
NES
,
Geocities
,
Blue Moon
.
Entire thread
arrays in java
1
Name:
Anonymous
2007-01-16 10:27
can someone tell me how to copy a 2 dimensional array to a 1 dimensional one? Ie.
array:
{2, 3, 5}
{4, 7, 9}
should become {2, 3, 5, 4, 7, 9}
11
Name:
Anonymous
2007-01-16 20:29
Python, alternative:
ConvertArray = lambda x: reduce(operator.add, x)
>>8
So what?
>>> [2, 3, 5] + [4, 7, 9]
[2, 3, 5, 4, 7, 9]
Far nicer, easier to read and write, easier to understand for somebody who doesn't know the language, and WTF, less verbose? I thought everybody bashed Python for being verbose.
Newer Posts
Don't change these.
Name:
Email:
Entire Thread
Thread List