arr = [1,4,6,-7,16]
maximum = arr[0]
minimum = arr[0]
length = len(arr)
for i in range(1, length, 1):
    if minimum>arr[i]:
        minimum = arr[i]
    if maximum<arr[i]:
        maximum = arr[i]
print("최솟값 : %d, 최댓값 : %d" %(minimum, maximum))

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: