On Fri, 18 Jan 2008 15:05:23 +1100, Ben Finney wrote: > "J. Peng" <[EMAIL PROTECTED]> 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).
Did you forget the array module? >>> import array >>> array <module 'array' from '/usr/lib/python2.5/lib-dynload/arraymodule.so'> >> I see list has all features of array in C or perl. > > You may also want to compare and constrast Python 'list' and 'dict'. The Original Poster might also like to check out the help() and dir() functions in the interactive interpreter: help(list) dir(list) help(array) help(array.array) etc. -- Steven -- http://mail.python.org/mailman/listinfo/python-list