📜  生成随机列表并在列表python代码示例中找到最大值

📅  最后修改于: 2022-03-11 14:45:54.820000             🧑  作者: Mango

代码示例1
import random
import time

numbers = []
count = 10
random.seed(round(time.time()))
for i in range(count):
    numbers.append((random.randint(0, 50)))
print(numbers)
print(f"Maximum value is {max(numbers)}")
print(f"Minimum value is {min(numbers)}")