Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

generate random list and find max in list python

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)}")
Comment

PREVIOUS NEXT
Code Example
Python :: extract outliers from boxplot 
Python :: drop 0 in np array 
Python :: find average with sum and len in python 
Python :: pandas count number of repetitions of each diferent value 
Python :: how to append number in tuple 
Python :: strip whitespace python 
Python :: Reason: Worker failed to boot 
Python :: how to scale an array between two values python 
Python :: remove first item from list python 
Python :: series astype 
Python :: python plus 
Python :: python call function in class 
Python :: np.exp in python numpy 
Python :: python print every n loops 
Python :: How do I stop Selenium from closing my browser 
Python :: input code for python 
Python :: python delete dictionary key 
Python :: python redirect with button click 
Python :: max between two numbers python 
Python :: how to decrease size of graph in plt.scatter 
Python :: python built in functions 
Python :: split paragraphs in python 
Python :: get key from dict python 
Python :: mongodb in python 
Python :: Set value of dataframe using condition 
Python :: boto3.client python 
Python :: django form example 
Python :: django email change sender name 
Python :: convert string to number python 
Python :: python os get dir path 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =