Hướng dẫn Python

TRANG CHỦ Python Giới thiệu Python Python Bắt đầu Cú pháp Python Nhận xét Python Biến Python Các kiểu dữ liệu Python Số Python Đúc Python Chuỗi Python Python Booleans Toán tử Python Danh sách Python Python Tuples Bộ Python Từ điển Python Python Nếu ... Khác Python While Loops Python cho các vòng lặp Các hàm Python Python Lambda Mảng Python Các lớp / đối tượng Python Kế thừa Python Trình lặp lại Python Phạm vi Python Mô-đun Python Ngày trong Python Toán Python JSON Python Python RegEx Python PIP Python Thử ... Ngoại trừ Đầu vào của người dùng Python Định dạng chuỗi Python

Xử lý tập tin

Xử lý tệp Python Tệp đọc Python Viết / tạo tệp trong Python Xóa tệp trong Python

Mô-đun Python

Hướng dẫn NumPy Panda Walkthrough Hướng dẫn về Scipy

Python Matplotlib

Giới thiệu Matplotlib Matplotlib Bắt đầu Matplotlib Pyplot Matplotlib Plotting Điểm đánh dấu Matplotlib Dòng Matplotlib Nhãn Matplotlib Matplotlib Grid Matplotlib Subplots Matplotlib Scatter Matplotlib Bars Biểu đồ Matplotlib Biểu đồ bánh Matplotlib

Học máy

Bắt đầu Chế độ trung bình trung bình Độ lệch chuẩn Phân vị Phân phối dữ liệu Phân phối dữ liệu bình thường Lô phân tán Hồi quy tuyến tính Hồi quy đa thức Nhiều hồi quy Tỉ lệ Huấn luyện / Kiểm tra Cây quyết định

Python MySQL

MySQL Bắt đầu MySQL Tạo cơ sở dữ liệu MySQL Tạo bảng Chèn MySQL Lựa chọn MySQL MySQL ở đâu MySQL Đặt hàng bởi MySQL Delete Bảng thả MySQL Cập nhật MySQL Giới hạn MySQL Tham gia MySQL

Python MongoDB

MongoDB Bắt đầu MongoDB Tạo cơ sở dữ liệu MongoDB Tạo Bộ sưu tập Chèn MongoDB MongoDB Tìm Truy vấn MongoDB MongoDB sắp xếp MongoDB Xóa MongoDB Drop Collection Cập nhật MongoDB Giới hạn MongoDB

Tham khảo Python

Tổng quan về Python Các hàm tích hợp trong Python Phương thức chuỗi Python Phương thức danh sách Python Phương thức từ điển Python Phương thức Tuple trong Python Phương thức tập hợp Python Phương thức tệp Python Từ khóa Python Ngoại lệ Python Bảng chú giải thuật ngữ Python

Tham chiếu mô-đun

Mô-đun ngẫu nhiên Mô-đun yêu cầu Mô-đun thống kê Mô-đun Toán học Mô-đun cMath

Python Làm thế nào để

Xóa danh sách trùng lặp Đảo ngược một chuỗi Thêm hai số

Ví dụ Python

Ví dụ Python Trình biên dịch Python Bài tập Python Python Quiz Chứng chỉ Python

Các hàm được xây dựng trong Python


Python có một tập hợp các hàm tích hợp sẵn.

Function Description
abs()Returns the absolute value of a number
all()Returns True if all items in an iterable object are true
any()Returns True if any item in an iterable object is true
ascii()Returns a readable version of an object. Replaces none-ascii characters with escape character
bin()Returns the binary version of a number
bool()Returns the boolean value of the specified object
bytearray()Returns an array of bytes
bytes()Returns a bytes object
callable()Returns True if the specified object is callable, otherwise False
chr()Returns a character from the specified Unicode code.
classmethod()Converts a method into a class method
compile()Returns the specified source as an object, ready to be executed
complex()Returns a complex number
delattr()Deletes the specified attribute (property or method) from the specified object
dict()Returns a dictionary (Array)
dir()Returns a list of the specified object's properties and methods
divmod()Returns the quotient and the remainder when argument1 is divided by argument2
enumerate()Takes a collection (e.g. a tuple) and returns it as an enumerate object
eval()Evaluates and executes an expression
exec()Executes the specified code (or object)
filter()Use a filter function to exclude items in an iterable object
float()Returns a floating point number
format()Formats a specified value
frozenset()Returns a frozenset object
getattr()Returns the value of the specified attribute (property or method)
globals()Returns the current global symbol table as a dictionary
hasattr()Returns True if the specified object has the specified attribute (property/method)
hash()Returns the hash value of a specified object
help()Executes the built-in help system
hex()Converts a number into a hexadecimal value
id()Returns the id of an object
input()Allowing user input
int()Returns an integer number
isinstance()Returns True if a specified object is an instance of a specified object
issubclass()Returns True if a specified class is a subclass of a specified object
iter()Returns an iterator object
len()Returns the length of an object
list()Returns a list
locals()Returns an updated dictionary of the current local symbol table
map()Returns the specified iterator with the specified function applied to each item
max()Returns the largest item in an iterable
memoryview()Returns a memory view object
min()Returns the smallest item in an iterable
next()Returns the next item in an iterable
object()Returns a new object
oct()Converts a number into an octal
open()Opens a file and returns a file object
ord()Convert an integer representing the Unicode of the specified character
pow()Returns the value of x to the power of y
print()Prints to the standard output device
property()Gets, sets, deletes a property
range()Returns a sequence of numbers, starting from 0 and increments by 1 (by default)
repr()Returns a readable version of an object
reversed()Returns a reversed iterator
round()Rounds a numbers
set()Returns a new set object
setattr()Sets an attribute (property/method) of an object
slice()Returns a slice object
sorted()Returns a sorted list
staticmethod()Converts a method into a static method
str()Returns a string object
sum()Sums the items of an iterator
super()Returns an object that represents the parent class
tuple()Returns a tuple
type()Returns the type of an object
vars()Returns the __dict__ property of an object
zip()Returns an iterator, from two or more iterators