Python min() Function: Uses & Examples

  1. Return the minimum value in the iterable object.
  2. Used to compare two or more numerical values and return the smallest one.
  3. It is possible to set keyword parameters to specify the method of comparison.
  4. Can be used to compare strings (based on ASCII value comparison).
  5. It can be used to compare dates (datetime objects).
  6. Can be used to compare custom objects (requires defining the __lt__() method).
bannerAds