A Primer on Python for Life Science Researchers

  • Sebastian Bassi mail

    Sebastian Bassi is with the Universidad Nacional de Quilmes, Buenos Aires, Argentina. E-mail:


Reader Comments (3)

Post a new comment on this article


Posted by Winawer on 16 Mar 2008 at 06:55 GMT

C programmers will find lists similar to vectors

C doesn't have a mutable vector data type; perhaps you meant C++'s Vector, which is part of the STL. C's arrays are much less flexible (yet probably at least a little faster) than Python's list type.

RE: C++? (Response from the author)

PLoS_CompBiol replied to Winawer on 26 Mar 2008 at 18:29 GMT

You are right on the difference between C++ vectors and C arrays. But I didn't mean that C has a mutable vector data type. I wanted to point out that C programmers will anyway find it similar (arrays or vector to list) since that is what they know. Both data types share the property that can store several values at once (unlike a scalar type) and they can be walked over and indexed. Python list has its own unique properties, but that statement was made in order to show C programmers something they know to learn something new.
Maybe the problem lies in the fact that in Spanish "array" is translated as a "vector". So I agree that the article could be changed from "C programmers will find lists similar to vectors." to "C++ programmers will find lists similar to vectors." or to "C programmers will find lists similar to arrays." Both proposed statements are true, choosing one from them is a matter of taste.