()
| 1 | # Implement Queue using List(Functions) |
| 2 | q=[] |
| 3 | def Enqueue(): |
| 4 | if len(q)==size: # check wether the stack is full or not |
| 5 | print("Queue is Full!!!!") |
| 6 | else: |
| 7 | element=input("Enter the element:") |
| 8 | q.append(element) |
| 9 | print(element,"is added to the Queue!") |
| 10 | def dequeue(): |
| 11 | if not q:# or if len(stack)==0 |
| 12 | print("Queue is Empty!!!") |