[Tutor] arrays

Kalle Svensson kalle@gnupung.net
Mon, 2 Apr 2001 05:17:05 +0200


Sez Katharine Stoner:
> Hi all,
> 
> Can you put an array inside of another array?

Do you mean Python lists (builtin), NumPy Arrays or something else?

If you mean lists, the answer is yes:

>>> l = ["a", ["nested"], "list"]
>>> l.append(["another", ["nested", "list"]])
>>> l
['a', ['nested'], 'list', ['another', ['nested', 'list']]]
>>>

Otherwise, the answer is "Maybe, I don't know".

Peace,
  Kalle
-- 
Email: kalle@gnupung.net     | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD
 [ Not signed due to lossage.  Blame Microsoft Outlook Express. ]