logic: Assume element at 0th index of list as max then go on comparing with other elements of list using loop if any element >max assign that value to max finally print max list=[10,20,30] max=list[0] for i in list: if i>max: max=i print(max,'is maximum') and for minimum just change code statement i