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
- Python conditional derivation
- Python list derivation
- Python dictionary derivation
- Python variable length arguments *argc/**kargcs
- The Python anonymous function lambda
- Python Return logical judgment expressions
- Python is and == are different
- Python is mutable and immutable
- Shallow and deep Python copies
- Python Exception handling
- The Python thread creates and passes parameters
- Python thread mutex Lock
- Python thread time Event
- The Python thread Condition variable Condition
- Python thread Timer Timer
- Python thread Semaphore
- The Python thread Barrier object
- Python Thread Queue – FIFO
- Python thread queue LifoQueue – LIFO
- Python 线程优先队列 PriorityQueue
- ThreadPoolExecutor(1)
- ThreadPoolExecutor(2)
- The Python Process module
- The Python Process is different from the threading Process
- Queue/Pipe for communication between Python processes
- Python process Pool multiprocessing.pool
- Python GIL lock
The min function in Python
This article is posted by the blog – Ape says Programming Ape says Programming!