repl.it
Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class Queue(object):

  def __init__(self):
    self.items = []

  def Queuing(self,value):
    return self.items.insert(0,value)

  def dequeue(self):
    return self.items.pop()
  
  def peek(self):
    return (self.items[len(self.items)-1])

  def size(self):
    return len(self.items)
    
  def isEmpty(self):
    return self.items == []
?