# coding: utf8 # 定义一个随机数迭代器, import random class RandomIter: def __init__(self, start, end, times): self.start = start self.end = end self.max_times = times self
定义一个随机数迭代器(1到50,随机输出30个数)
最新推荐文章于 2024-05-29 14:29:36 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
# coding: utf8 # 定义一个随机数迭代器, import random class RandomIter: def __init__(self, start, end, times): self.start = start self.end = end self.max_times = times self