这里是一个Python代码示例,可以随机生成70个400以内的数字:

import random

numbers = []
for i in range(70):
    num = random.randint(1, 400)
    numbers.append(num)

print(numbers)

输出结果类似于:

[134, 357, 144, 110, 322, 261, 330, 247, 76, 256, 81, 325, 117, 202, 138, 222, 9, 88, 328, 163, 115, 246, 347, 351, 176, 91, 217, 324, 21, 349, 102, 277, 44, 111, 377, 365, 71, 295, 85, 245, 154, 133, 94, 397, 89, 366, 4, 338, 172, 188, 115, 375, 197, 193, 187, 369, 389, 148, 265, 151, 108, 367, 236, 85, 39, 77, 83, 187, 398, 72, 161, 290]
``
随机生成70个400以内的数字

原文地址: https://www.cveoy.top/t/topic/eOtL 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录