Let's start with a very basic simple question of finding the smallest or minimum element from the given list of integers. You will be using these type of codes like finding the minimum, average, maximum, median, and a lot more when dealing with new data. Let's listen Sajan explain the approach that you can take.
We can also use the Python inbuilt functionality to perform a lot of actions. Let’s see Sajan code the problem explained above and show us the Python inbuilt functionality to do the same.
You can read more about min() functionality of python here. Other important Python inbuilt functions can be found here. It is always better to use these than to write code that performs the same action. However, the aim of this question is to develop a coding intuition and help you understand the working of these inbuilt functions.
Lists are the most common iterable data structure in python. This question was to familiarise you with iterations on the list. Let's check the next problem.