Bar chart — tallest bar = maximum
max = ?
1nums = list(map(int, input().split()))
2print(max(nums))
Read a list of integers, then print the maximum. Like finding the winner in a class quiz — the highest bar wins.
Start with the first item. If you see a bigger one, it becomes the winner.
You have a list of numbers, and you need the biggest one. This is like scanning a class score sheet and picking the top score.
Used in leaderboards, highest temperature in a week, most expensive product in a cart, or best performance metric in analytics dashboards.
max(nums) scans every item and returns the largest value.nums.index(max(nums)).A teacher's portal stores scores as a list. max(scores) instantly finds the top mark for the trophy row — no manual scanning needed.