max num in a list

Sai_kiran_rachakonda · October 30, 2022
num = [2,3,2,4,7,8]
num.sort(reverse = True)
print(num[0])

      #or

num = [2,3,2,4,7,8]
print(max(num))
Output

Comments

Please sign up or log in to contribute to the discussion.