text_plain_output_1.png
from collections import deque

from collections import deque

from collections import deque

from collections import deque
antrian = deque([1, 2, 3, 4, 5])
antrian.append(6)
antrian.append(7)
out = antrian.popleft()
out = antrian.popleft()
out = antrian.popleft()
antrian.append(8)

from collections import deque
antrian = deque([1, 2, 3, 4, 5])
npm = deque([200902001, 200902002, 200902003, 200902004, 200902005])
antrian.append(6)
antrian.append(7)
out = antrian.popleft()
outnpm = npm.popleft()

from collections import deque
antrian = deque([5, 6, 7, 8, 9])
print('Jumlah Antrian : ', antrian)
antrian.append(10)
print('Pembeli ke ', 10)
print('Jumlah Antrian :', antrian)
antrian.append(11)
print('Pembeli ke ', 11)
print('Jumlah Antrian :', antrian)
out = antrian.popleft()
print('Pembeli yang keluar', out)
print('Jumlah Pembeli :', antrian)
out = antrian.popleft()
print('Pembeli yang keluar', out)
print('Jumlah Pembeli :', antrian)