-1

I ask this because i'm a beginner in CS and i have this doubt. So it would be nice if peeps try to explain instead of just make humor or downvote. I tought this site was for learning from others.

Is just a different name or there something different underlying it?

Can anyone briefly explain the difference beetween C arrays and Python lists?

pietrovismara
  • 6,102
  • 5
  • 33
  • 45
  • 4
    Try to remove an element from inside a c array – StoryTeller - Unslander Monica Feb 02 '14 at 13:16
  • Possible [dup](http://stackoverflow.com/questions/176011/python-list-vs-array-when-to-use) – Kobi K Feb 02 '14 at 13:17
  • [How are lists implemented?](http://docs.python.org/2/faq/design.html#how-are-lists-implemented) – Ashwini Chaudhary Feb 02 '14 at 13:18
  • 5
    Try this: `if not any(c in "array" for c in "list"): print("completely different")` – Matthias Feb 02 '14 at 13:22
  • 1
    Basically, Python lists are C arrays with associated length informations (to permit resizing them). – michaelmeyer Feb 02 '14 at 13:31
  • 1
    Python is written in c, so maybe you should ask "[How is Python's List Implemented?][1]". [1]: http://stackoverflow.com/questions/3917574/how-is-pythons-list-implemented – bpceee Feb 02 '14 at 14:01
  • 1
    This response to another recent question might be helpful in giving you an idea http://stackoverflow.com/a/21511293/1230086 – tijko Feb 02 '14 at 14:19
  • @Cuz When you move your mouse on the down-vote button a pop-up says "This question does not show any research effort; it is unclear or not useful". So, if somebody thinks that one of the three applies, he will down-vote. – Massimiliano Feb 02 '14 at 14:33
  • Stack overflow is also not about guilting people into helping you. Over half your question is preamble and contributes nothing. – Max Feb 02 '14 at 15:29
  • *boggle* If you think stack overflow sucks, then why are you using the site? – Max Feb 02 '14 at 21:13

1 Answers1

1

A Python list is essentially an array of object references that keeps track of how many elements it contains.

(Conceptually, a Python reference is somewhat similar to a C pointer.)

Read more here: Internals of Python list, access and resizing runtimes

Community
  • 1
  • 1
NPE
  • 486,780
  • 108
  • 951
  • 1,012