To find the largest number in a list of numbers in Python, we can use the built-in max() function.
Here's the code:
main.py78 chars4 lines
Output:
main.py2 chars2 lines
In the above code, we first create a list of numbers. We then use the max() function to find the largest number in the list, and assign the value to a variable named largest_number. Finally, we print the value of largest_number using the print() function.
gistlibby LogSnag