array and list

Ben Finney bignose+hates-spam at benfinney.id.au
Thu Jan 17 23:05:23 EST 2008


"J. Peng" <peng.kyo at gmail.com> writes:

> what's the difference between an array and a list in python?

In Python, 'list' is a basic built-in type. Python has no 'array'
type, though that term is often used to refer to the 'array' type
defined in Numeric Python (which is not part of the standard library,
so not really part of Python).

> I see list has all features of array in C or perl.

You may also want to compare and constrast Python 'list' and 'dict'.

-- 
 \              "When cryptography is outlawed, bayl bhgynjf jvyy unir |
  `\                                           cevinpl."  -- Anonymous |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list