请问如何创建一个Queues程序

这个程序将模拟一个洗车公司

1 生成5个随机数。不应该重复。
2 从这个随机数。你可以用它来生成车牌号码。
3 将随机数放入生成的队列中。这表示该车是队列中的第一辆。
4 展示五辆车的服务时间表。
5 利用一个queue

img

import queue
import random


# 生成随机车牌
def chepaihao(lens=6):
    char0 = '京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽赣粤青藏川宁琼'

    char1 = 'ABCDEFGHJKLMNPQRSTUVWXYZ'  # 车牌号中没有I和O,可自行百度

    char2 = '1234567890'

    len0 = len(char0) - 1

    len1 = len(char1) - 1

    len2 = len(char2) - 1

    code = ''

    index0 = random.randint(1, len0)

    index1 = random.randint(1, len1)

    code += char0[index0]

    code += char1[index1]

    for i in range(1, lens):
        index2 = random.randint(1, len2)

        code += char2[index2]

    return code


q = queue.Queue()
if __name__ == '__main__':
    for i in range(1, 6):
        carnumber = chepaihao()
        q.put(carnumber)
        print(f"Car with a plate number of {carnumber} was the {i} to arrive")

    while not q.empty():
        print(f'cleaning {q.get()}....done')

img