Understanding Stacks and Queues in python
<p>So i was given this question. Consider the Stack and the Queue class with standard set of operations. Using the Stack and Queue class, what items are contained in them just before the mysteryFunction is called AND just after the mysteryFunction is called?</p>

<p>Here is the code:</p>

<pre><code>def mysteryFunction(s, q):
    q.enqueue('csc148')
    q.enqueue(True)
    q.enqueue(q.front())
    q.enqueue('abstract data type')

    for i in range(q.size()):
        s.push(q.dequeue())

    while not s.is_empty():
        q.enqueue(s.pop())


if __name__ == '__main__':
    s=Stack()
    q=Queue()

#About to call mysteryFunction
#What are contents of s and q at this point?
    mysteryFunction(s, q)
#mysteryFunction has been called.
#What are contents of s and q at this point?
</code></pre>

<p>I'm having trouble understanding object oriented programming as i'm new to this topic. Is there any link that breaks down Stacks and Queues and what they do?</p>