how to find highest number in list python
list_of_numbers = [1, 3, 2, 0]
max(list_of_numbers)
how to find highest number in list python
list_of_numbers = [1, 3, 2, 0]
max(list_of_numbers)
how to find greatest number in python
Method 1 : Sort the list in ascending order and print the last element in the list.
filter_none
edit
play_arrow
brightness_4
# Python program to find largest
# number in a list
# list of numbers
list1 = [10, 20, 4, 45, 99]
# sorting the list
list1.sort()
# printing the last element
print("Largest element is:", list1[-1])
Output:
Largest element is: 99
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us