text_plain_output_1.png
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])
print('Jumlah Mahasiswa : ', antrian)
print('Nomor Antrian Mahasiswa :', npm)
antrian.append(6)
print('Mahasiswa ke : ', 6)
print('Nomor Npm : ', 200902006)
print('Jumlah Mahasiswa:', antrian)
antrian.append(7)
print('Mahasiswa ke : ', 7)
print('Nomor Npm : ', 200902007)
print('Jumlah Mahasiswa: ', antrian)
out = antrian.popleft()
outnpm = npm.popleft()
print('Mahasiswa yang ke: ', out)
print(npm)
print('Jumlah Mahasiswa Sekarang : ', antrian)