"Clara Mintz" <jamani.s...@hotmail.com> wrote

I am sorry I am a beginner at python and I was reading my book and I came across the terms Nodes and Queue. I am sorry but I don't quite understand how they work.

Its a bit of Comp Science terminology.
A Queue is a particular type of data structure somewhat like a Python list but usually implemented in other languages using a series of Node objects each of which holds a value and a link to the next Node. You then add values to the queue by creating a new Node and linking it to the existing queue.

In Python you would usually implement a queue using the standard list and use its pop/push methods and indexing to simulate the behaviour without the hassle of creating Node classes etc.

It suggests your book is a comp science oriented book that happens to use Python rather than a dedicated Python tutorial. (That is not necessarily a bad thing, it will better prepare you for learning other languages in the future)

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to