directory

  • Min functions in Python
  • The min function is used in Python
    • Three. Guess you like it

Python Basics: Python Basics

Min functions in Python

The min function returns the minimum value of a given argument, which can be sequential syntax:

Return value: the minimum value of the returned argument; min( x, y, z, .... )Copy the code

The min function is used in Python

#! Usr /bin/env python # -* -coding :utf-8 _*- """ @author: www.codersrc.com @file :Python min function. Py @time :2021/05/09 08:00 @Motto: no accumulation of small steps to achieve a thousand miles, no accumulation of small streams to become a river sea, the program life of wonderful need to unremitting accumulation! Print (min(1,5)) print(min(5.5, 60,1,-10,20)) ""Copy the code

Note: min functions can only be int or float types, other types will report an error, such as:

print(min(1,'a'))

TypeError: '>' not supported between instances of 'str' and 'int'
Copy the code

3.Guess you like

  1. Python conditional derivation
  2. Python list derivation
  3. Python dictionary derivation
  4. Python variable length arguments *argc/**kargcs
  5. The Python anonymous function lambda
  6. Python Return logical judgment expressions
  7. Python is and == are different
  8. Python is mutable and immutable
  9. Shallow and deep Python copies
  10. Python Exception handling
  11. The Python thread creates and passes parameters
  12. Python thread mutex Lock
  13. Python thread time Event
  14. The Python thread Condition variable Condition
  15. Python thread Timer Timer
  16. Python thread Semaphore
  17. The Python thread Barrier object
  18. Python Thread Queue – FIFO
  19. Python thread queue LifoQueue – LIFO
  20. Python 线程优先队列 PriorityQueue
  21. ThreadPoolExecutor(1)
  22. ThreadPoolExecutor(2)
  23. The Python Process module
  24. The Python Process is different from the threading Process
  25. Queue/Pipe for communication between Python processes
  26. Python process Pool multiprocessing.pool
  27. Python GIL lock

The min function in Python

This article is posted by the blog – Ape says Programming Ape says Programming!