2023年Python零基础完整教程:从入门到精通

Python教程 – 第1部分(共7部分)

Python是最受欢迎的编程语言之一。近年来,由于对数据科学、深度学习、机器学习和人工智能日益增长的兴趣,它的流行度大幅提升。


只需看一下Python编程语言在Google Trends中的兴趣图表,它一直在不断增长,并将持续增长。

Python兴趣随时间变化

为什么要学习Python编程?

  1. Python编程非常简单、优雅,语法类似英语。因此学起来非常容易,是开始IT职业生涯的绝佳编程语言。
  2. Python是开源的,你可以自由扩展它,使其功能更加强大。
  3. Python拥有庞大的社区支持。在Python类别中,StackOverflow上有超过一百万个问题。
  4. 有大量的免费模块和软件包可以帮助你在开发的各个领域中获得帮助。
  5. 大多数机器学习、数据科学、图形和人工智能API都是基于Python构建的。所以,如果你想在尖端技术领域工作,Python是一个很好的选择。
  6. 世界上几乎每个主要公司都在使用Python。如果你懂Python编程,找到工作的机会就会更大。如果你在申请任何Python相关工作,请参考Python面试问题。
  7. Python编程没有任何限制,你可以在物联网、Web应用程序、游戏开发、密码学、区块链、科学计算、图形等许多领域中使用它。

Python教程分类

Python教程可以广泛地分为以下几个类别:

  1. Python基础 – 语法、数据类型、变量、循环、函数、数字、字符串、类、对象等等。
  2. Python内置函数 – format()、len()、super()、range()、slice()、tuple()、list()等等。
  3. Python模块 – collections、json、xml、io、os、sys、time、datetime等等。
  4. Web应用框架 – Django、Flask。
  5. 高级主题 – 图形、人工智能、机器学习模块如Matplotlib、NumPy、TensorFlow、SciKit、Pandas等等。

重要的Python教程要点

  1. 如果你对Python完全没有了解,花足够的时间去学习基础知识。如果你的Python基础不扎实,你的代码就不会具有Python特色。
  2. Python有两个主要的运行版本 – Python 2和Python 3。Python 3与Python 2不向后兼容。然而,推荐使用Python 3版本。这就是为什么这里所有的Python教程都基于Python 3的原因。
  3. 在阅读Python教程时,请按照例子的步骤在你的IDE中运行它们,以便更好地理解。
  4. JetBrains的PyCharm是Python编程的完美IDE。其社区版可以免费使用。
  5. 我们的大部分示例都存储在GitHub仓库中。你可以下载它们并查看示例。我建议你先fork该项目,然后再与代码进行互动操作。
  6. 如果你认为我们在Python方面有所遗漏,欢迎在这里留言,我将纳入讨论。

Python基础知识

Topic Description
Python Tutorial for Beginners Brief information about Python programming language and its advantages. Learn how to install Python on Windows, Linux/Ubuntu and Mac OS operating systems.
Python Keywords & Identifiers An article about keywords, identifiers and variables in Python. Learn about the rules for writing valid identifiers. Also read Global Variables in Python.
Python comments and statements Quick introduction to different types of comments and statements with example code.
Python Data Types Numeric, String, List, Tuple and Dict data types introduction.
Python IO File Operations – Read, Write, Open, Close. Taking input from user and import statement.
Python Operators Arithmetic, Comparison, Bitwise, Logical, and Assignment Operators. Learn about the operator precedence in Python programming.
Python if-else Python Conditional Logic, examples of if-else and elif conditional logic.
Python for loop Python for loop examples. Also, learn about nested for loops in Python.
Python while loop Python while loop, nested while loop and infinite while loop examples.
Python break continue A brief tutorial on Python break keyword and continue statement.
Python pass statement Learn about pass statement and the best practices to use them in your code.
Python loop Learn how to loop over a sequence, reverse looping, traversing through multiple sequences at once.
Python functions Learn how to define a function in Python, different types of arguments
Python Recursion How to implement recursion in Python, printing Fibonacci series using recursion.
Python Anonymous Function What is Python Anonymous function? How and when to use anonymous function in Python.
Python Modules Understand what is a module in Python. Difference between module and package and how to import a module in your program.
Python Package Quick introduction to Python packages and how to use them.
Python Numbers Different types of numbers, type conversion and complex numbers in Python
Python List Python List functions – create, update, delete, append and iterate through elements.
Python Tuple Learn about accessing tuple elements, update and delete tuple, important tuple functions.
Python String A brief introduction of String in Python and important Python string functions.
Python set Learn how to work with Set in Python.
Python Dictionary Python dictionary operations, accessing key-value pairs, deleting dict elements.
Python File Python file operations – read, open, write, delete and copy file.
Python Directory How to create, rename and delete a directory in Python.
Python sort list Learn how to sort a List elements in Python, sort in decending order and with custom logic.
Python List Comprehension Learn about Python List Comprehension to create list from some source sequence, string or list.
Python try except Learn how to perform exception handling in Python using try-except block.
Python Custom Exception How to create custom exception in Python.
Python namespace Python namespace and variable scope
Python Class Everything about Python Classes, how to define them with variables, constructors, and functions.
Python Inheritance Learn about inheritance in Python, method overloading, super class and sub class.
Python Multiple Inheritance Python Multiple Inheritance Example. What is the difference between Multiple Inheritance and Multi-level Inheritance, Method Resolution Order (MRO) and logic to resolve the Conflicts with python multiple inheritance.
Python Operator Overloading Python allows us to overload operators to work with custom object. Learn how to use operator overloading in Python.
Python Iterator Python Iterator protocol, iterable elements, creating custom iterator example program.
Python Generator Learn about yield keyword in Python to create generator functions that returns a series of arguments and work as an iterator.
Python Closure A slightly complex topic with nested functions where outer function returns the nested function and nested function does some work on the enclosed function arguments.
Python Decorator Python decorator is a function that helps to add some additional functionalities to an already defined function.
Python Array Python Array contains a sequence of data. In python programming, there is no exclusive array object because we can perform all the array operations using list.
Python list append Short example for using list append() function in Python.
Python string to int Learn about different ways to convert string to int and vice versa in Python.
Python variables A look into Python variable declaration and their scope.
Python lambda A brief introduction to Python lambda keyword to create anonymous functions.
Python metaclass Pyton metaclass introduction and how to create a metaclass.
Python switch case Unlike many other famous programming languages, Python doesn’t have switch-case statement. However, we can write code using dictionary to simulate the same behavior.
Python modulo Python modulo operation is used to get the reminder of a division. The basic syntax of Python Modulo is a % b. Here a is divided by b and the remainder of that division is returned.
Python assert statement Python assert statement takes a condition, the condition needs to be true. If the condition is true, then the program will run smoothly and the next statements will be executed. But, if the condition is false then it raises an exception.
Python yield Python yield has almost same purpose as return keyword except that it returns the values one by one. This is very useful keyword when you need to return a huge number of values.
Python Stack Python doesn’t provide any implementation of Stack data structure. This example shows how to implement stack data structure in Python.
Python PIP PIP is a package management system used to install and manage software packages written in Python.
Python self A brief article on the ‘self’ argument present in Python class constructors.
Python ternary operator Learn how to effectively use Python ternary operator to reduce boiler plate code.
Python print format In this lesson, we will study about various ways for Python print format, through which we can print our data on the console and interpolate it.
Python Command Line Arguments Python Command line arguments are input parameters passed to the script when executing them. Learn how to effectively read and parse command line parameters in Python.
Python main function Learn the special technique to define main method in python program, so that it gets executed only when the program is run directly and not executed when imported as a module.
Python Garbage Collection Python garbage collection is the memory management mechanism in python.
Python XML Parser Python ElementTree XML API provides us easy way to read XML file and extract useful data.
Python Join List to String We can use String join() function to concatenate a list of string with specified delimiter to create a new string.
Python __init__() function A complete tutorial for Python class __init__() function.
Python print to file Learn how to route Python print() function output to a file.
Python static method In this Python tutorial, we will learn how to create Python static method. We will also look at advantages and disadvantages of static methods and comparison with the instance methods.
Python Calculator Program In this Python tutorial, we will learn how to create a very simple python calculator program. We will take input from the user about the operation he wants to perform and show the result on its basis.
Python classmethod Learn how to use @classmethod annotation to create Python class methods.
Python counter Python Counter class is part of Collections module. Counter is a subclass of Dictionary and used to keep track of elements and their count.
Python OrderedDict Python OrderedDict is a dict subclass that maintains the items insertion order. When we iterate over an OrderedDict, items are returned in the order they were inserted.
Python namedtuple Python namedtuple object is part of collections module. Python namedtuple is an extension of tuple.
Python Catch Multiple Exceptions Sometimes we call a function that may throw multiple types of exceptions depending on the arguments, processing logic etc. In this tutorial, we will learn how to catch multiple exceptions in python.
Python add to dictionary There is no explicitly defined method to add a new key to the dictionary. If you want to add a new key to the dictionary, then you can use assignment operator with dictionary key.
Python Current Date Time We can use Python datetime module to get the current date and time of the local system. Python pytz is one of the popular module to get the timezone aware date time objects.
Python strftime() Python strftime() function is present in datetime and time modules to create a string representation based on the specified format string.
Python timedelta Python timedelta object is used to perform datetime manipulations in an easy way. The timedelta class is part of datetime module.
Python date Python date class is part of datetime module.
Python wait for specific time Sometimes we want our python program to wait for a specific time before executing the next steps. We can use time module sleep() function to pause our program for specified seconds.
Python string to datetime – strptime() We can convert a string to datetime using strptime() function. This function is available in datetime and time modules to parse a string to datetime and time objects respectively.
Python Complex Numbers A complex number is created from two real numbers. Python complex number can be created using complex() function as well as using direct assignment statement.
Python Set Intersection
Python Set Difference
Python Set Union
Python Set to List
Python Reverse List
Python Set Environment Variable
Python *args and **kwargs
Python Division
Python Not Equal Operator
Python Return statement
Python and operator
Python logical operators
Python Bitwise Operators
Python Comparison Operators

Python 内置函数

函数 描述
Python input() Python input() 函数用于从控制台获取用户输入。
Python zip() Python zip() 函数接受可迭代元素作为输入,并返回迭代器。
Python super() Python super() 函数允许我们显式地引用父类。在继承中想要调用父类函数时很有用。
Python getattr() Python getattr() 函数用于获取对象属性的值,如果未找到该对象的属性,则返回默认值。
Python type Python type() 函数示例,用于确定对象的类型。
Python range() Python range() 函数示例,用于生成数字列表。
Python enumerate() Python enumerate() 接受一个序列,然后将序列中的每个元素转换为元组。
Python float() 这个内置函数用于创建浮点数。我们可以使用此函数将字符串转换为浮点数。
Python print() 最广泛使用的 Python 函数之一,用于将值打印到流,默认情况下打印到 sys.stdout。
Python hash() Python hash() 函数返回对象的哈希值,这是一个固定大小的整数,用于标识特定值。
Python __str__() 和 __repr__() Python __str__() 函数返回对象的字符串表示。当在对象上调用 print() 或 str() 函数时,会调用此方法。Python __repr__() 函数返回对象的表示。它可以是任何有效的 Python 表达式,如元组、字典、字符串等。
Python eval() 函数 Python eval() 函数用于将表达式字符串解析为 Python 表达式,然后执行它。
Python exec() Python exec() 函数为动态代码执行提供支持。
Python import
Python abs()
Python all()
Python any()
Python ascii()
Python bin()
Python bool()
Python breakpoint()
Python bytearray()
Python bytes()
Python callable()
Python chr(), ord()
Python classmethod()
Python compile()
Python complex()
Python delattr()
Python dir()
Python divmod()
Python filter()
Python format()
Python frozenset()
Python globals()
Python hasattr()
Python help()
Python hex()
Python id()
Python int()
Python isinstance()
Python issubclass()
Python iter()
Python len()
Python locals()
Python map()
Python max()
Python min()
Python object()
Python oct()
Python open()
Python pow()
Python property()
Python reversed()
Python round()
Python set()
Python setattr()
Python slice()
Python sorted()
Python staticmethod()
Python sum()
Python vars()

Python字符串函数

主题 描述
Python字符串join() Python字符串join()函数用于连接一系列字符串以创建新字符串。
Python字符串转大写 – str.upper() 我们可以使用str.upper()函数将Python中的字符串转换为大写。
Python字符串转小写 – str.lower() 我们可以使用str.lower()函数将Python中的字符串转换为小写。在这个简短教程中,我们将学习如何将Python字符串转换为小写。
Python字符串包含 Python字符串类有__contains__()函数,我们可以用它来检查字符串是否包含另一个字符串。
Python字符串分割 Python字符串split()函数用于根据分隔符将字符串分割为字符串列表。
Python字符串替换replace() Python字符串replace()函数用于通过替换另一个字符串的某些部分来创建新字符串。
Python字符串格式化format() Python字符串format()函数用于从模板字符串和提供的值创建格式化字符串。
Python字符串模板 Python字符串模板类用于创建简单的模板字符串,其中字段可以在以后替换以创建字符串对象。
Python字符串转字节 学习如何在Python中将字符串转换为字节,然后再将字节转换为字符串。
Python检查变量是否为字符串 我们可以使用isinstance()函数来验证变量是否为字符串。
Python字符串比较 Python字符串比较可以使用相等(==)和比较(<, >, !=, =)运算符执行。
Python字符串连接join() Python字符串join()函数返回一个字符串,它是可迭代对象中字符串的连接,以字符串对象作为分隔符。
Python字符串连接 了解在Python中连接字符串的五种不同方法。
Python字符串切片 Python字符串支持切片以创建子字符串。注意,Python字符串是不可变的,切片会从源字符串创建一个新的子字符串,原始字符串保持不变。
Python中的f字符串 Python f字符串或格式化字符串是格式化字符串的新方法。此功能在Python 3.6中的PEP-498下引入。它也称为字面字符串插值。
Python原始字符串 Python原始字符串通过在字符串字面量前加上’r’或’R’来创建。Python原始字符串将反斜杠(\)视为字面字符。
Python字符串相等 Python字符串相等性可以使用==运算符或__eq__()函数检查。Python字符串区分大小写,因此这些相等性检查方法也区分大小写。
Python字符串编码encode()解码decode() Python字符串encode()函数用于使用提供的编码对字符串进行编码。此函数返回字节对象。Python字节decode()函数用于将字节转换为字符串对象。
Python修剪字符串 Python提供了三种方法可用于修剪字符串中的空白字符。
Python字符串长度 Python字符串长度可以使用内置的len()函数确定。
Python连接字符串和整数 了解连接字符串和整数以创建新字符串的不同方法。
Python反转字符串 Python字符串没有内置的reverse()函数。但是,有各种方法可以在Python中反转字符串。
Python列表转字符串 学习如何在Python程序中将列表转换为字符串。
Python字符串查找find() Python字符串find()方法用于查找字符串中子字符串的索引。
Python从字符串中移除字符 学习如何使用replace()和translate()函数从字符串中移除字符。
Python字符串追加 学习追加多个字符串以创建新字符串的最佳方法。
Python字符串转换translate() Python字符串translate()函数返回一个新字符串,其中字符串中的每个字符都使用给定的转换表替换。
Python字符串转浮点数 我们可以使用float()函数在Python中将字符串转换为浮点数。
Python字符串转列表 我们可以使用split()函数在Python中将字符串转换为列表。
Python字符串计数count() Python字符串count()函数返回给定字符串中子字符串出现的次数。
Python在列表中查找字符串 我们可以使用Python的in运算符检查列表中是否存在字符串。还有一个not in运算符用于检查列表中是否不存在字符串。
Python从字符串中移除空格 了解从Python字符串中移除空格的五种方法。
Python子字符串 Python字符串提供了各种方法来创建子字符串,检查它是否包含子字符串,子字符串的索引等。在本教程中,我们将研究与子字符串相关的各种操作。
Python生成随机字符串 有时我们想要生成一个随机字符串作为唯一标识符、会话ID或建议密码。学习如何在Python中生成随机字符串。
Python字符串模块 Python字符串模块包含一些常量、实用函数和用于字符串操作的类。
字符串包含子字符串? Python提供了两种常见方法来检查字符串是否包含另一个字符串。
Python字符串startswith() Python字符串startswith()函数如果字符串以给定前缀开头,则返回True,否则返回False。
Python字符串endswith() Python字符串endswith()函数如果字符串以给定后缀结尾,则返回True,否则返回False。
Python多行字符串 有时我们有一个非常长的字符串,我们想将其写入多行以提高代码可读性。Python提供了创建多行字符串的各种方法。
Python字符串capitalize() Python字符串capitalize()函数返回字符串的大写版本。返回字符串的第一个字符转换为大写,其余字符更改为小写。
Python字符串center() Python字符串center()函数返回指定大小的居中字符串。
Python字符串casefold() Python字符串casefold()函数返回字符串的casefolded副本。此函数用于执行不区分大小写的字符串比较。
Python字符串expandtabs() Python字符串expandtabs()函数返回一个新字符串,其中制表符(\t)被一个或多个空格替换。
Python字符串index() Python字符串index()函数返回找到指定子字符串的最低索引。如果找不到子字符串,则引发ValueError。
Python字符串format_map() Python字符串format_map()函数返回使用提供的映射中的替换项格式化的字符串版本。
Python字符串isalnum() 检查字符串是否由字母和数字组成。
Python字符串isalpha() 检查字符串是否只包含字母字符。
Python字符串isdecimal() 检查字符串是否只包含十进制字符。
Python字符串isdigit() 检查字符串是否只包含数字字符。
Python字符串isidentifier() 检查字符串是否是有效的标识符。
Python字符串islower() 检查字符串中的所有字母字符是否都是小写。
Python字符串isnumeric() 检查字符串是否只包含数字字符。
Python字符串isprintable() 检查字符串中的所有字符是否都是可打印的。
Python字符串isspace() 检查字符串是否只包含空白字符。
Python字符串istitle() 检查字符串是否是标题格式的(每个单词首字母大写)。
Python字符串isupper() 检查字符串中的所有字母字符是否都是大写。
Python字符串ljust(), rjust() 返回字符串的左对齐或右对齐版本,使用指定宽度的填充字符。
Python字符串swapcase() 返回字符串的副本,其中所有大写字母转换为小写,反之亦然。
Python字符串partition() 根据指定的分隔符将字符串分割为三部分。
Python字符串splitlines() 在行边界处分割字符串并返回行列表。
Python字符串title() 返回字符串的标题版本,其中每个单词的首字母大写。
Python字符串zfill() 在字符串左侧填充零,直到达到指定宽度。
Python字符串函数 Python字符串处理函数的完整参考指南。

Python 模块

主题 描述
Python os模块 Python OS模块提供了简单的函数,允许我们与操作系统交互并获取相关信息,甚至在一定程度上控制进程。
Python sys模块 Python sys模块提供了简单的函数,允许我们直接与解释器交互。
Python time模块 Python time模块帮助我们处理本地系统的日期和时间。本文还介绍了calendar模块,用于获取日历格式的数据。
Python MySQL Python pymysql模块用于连接MySQL数据库并执行数据库查询。
Python CSV模块 Python csv模块允许我们轻松地读写CSV文件。
Python multiprocessing模块 Python multiprocessing模块允许我们编写跨多个CPU并行处理的代码。Process、Queue和Lock是multiprocessing模块中最重要的类。
Python pickle模块 Python pickle模块用于序列化和反序列化Python对象结构。任何Python对象都可以被pickle化,以便可以保存在磁盘上。
Python time sleep函数 Python time sleep()函数用于在程序执行中添加延迟。我们可以使用python sleep函数来暂停程序的执行,以秒为单位给定的时间。
Python queue模块 Python queue模块提供了不同类型的队列数据结构的实现,如Queue、LifoQueue和Priority Queue。
Python unittest模块 Python unittest模块用于测试源代码单元。
Python socket模块 Python socket模块帮助我们在Python代码中实现socket服务器和客户端程序。
Python SimpleHTTPServer模块 Python SimpleHTTPServer模块是一个非常方便的工具。您可以使用Python SimpleHTTPServer将任何目录变成一个简单的HTTP Web服务器。
Python json模块 Python json模块用于将对象转换为JSON数据,反之亦然。
Python signal模块 Python signal模块对于几乎所有基本的信号处理操作都是必需的。
Python random模块 Python random模块用于生成随机数。
Python系统命令 我们可以使用os.system()函数或subprocess.call()函数从Python程序运行shell命令。
Python守护线程 学习如何使用Python threading模块创建守护线程。
Python复制模块 Python copy模块允许我们执行对象的浅拷贝和深拷贝。
Python threading模块 Python threading模块用于在Python程序中实现多线程。
Python struct模块 Python struct模块能够执行Python值和C结构体之间的转换,这些结构体表示为Python字符串。
Python logging模块 Python logging模块定义了为Python应用程序提供灵活事件日志系统的函数和类。
Python subprocess模块 Python subprocess模块提供了简单的函数,允许我们生成新进程并获取它们的返回码。
Python argparse模块 Python argparse模块是解析命令行参数的首选方法。
Python functools模块 Python functools模块为我们提供了各种工具,这些工具允许并鼓励我们编写可重用的代码。
Python itertools模块 Python itertools模块为我们提供了在遍历序列时操作序列的各种方法。
Python getopt模块 Python getopt模块是解析Python命令行参数的选项之一。
Python ftp模块 Python ftp模块帮助我们连接到FTP服务器,上传和下载文件。
Python tarfile模块 Python tarfile模块用于读写tar归档文件。
Python lxml库 Python lxml是处理XML和HTML数据的最功能丰富且易于使用的库。
Python ConfigParser模块 简而言之,使用configparser模块,我们可以将与应用程序相关的配置保存在系统任何位置的配置文件中,并在我们的应用程序中访问它。
Python datetime模块 Python datetime模块用于操作日期和时间。我们还可以格式化日期,创建朴素或时区感知的日期和时间对象。
Python decimal模块 Python decimal模块帮助我们在除法中进行适当的精度控制和数字舍入。
Python collections模块 Python collections模块附带了许多容器数据类型,如OrderedDict、defaultdict、counter、namedtuple和deque。
Python zipfile模块 Python zipfile模块帮助我们处理zip文件。在本文中,我们将学习如何使用zipfile模块读取zip归档详细信息,创建和提取zip文件。
Python pdb模块 Python pdb模块为开发人员提供了一个交互式调试环境,用于调试Python程序。
Python io模块 Python io模块允许我们管理文件相关的输入和输出操作。使用IO模块的优点是,可用的类和函数允许我们扩展功能,以支持写入Unicode数据。
Python fractions模块 Python fractions模块允许我们在Python程序中管理分数。
Python AST模块 抽象语法树是Python中一个非常强大的功能。Python AST模块允许我们与Python代码本身交互并修改它。
Python HTTP模块 Python HTTP模块定义了提供HTTP和HTTPS协议客户端的类。在本文中,我们将学习如何使用Python HTTP客户端发送HTTP请求,然后解析响应状态并获取响应体数据。
Python xmltodict模块 我们可以使用python xmltodict模块读取XML文件并将其转换为Dict或JSON数据。我们还可以流式处理大型xml文件并将它们转换为Dictionary。
Python gzip模块 Python gzip模块提供了一种非常简单的方式来压缩和解压缩文件,其工作方式类似于GNU程序gzip和gunzip。
Python HTML解析器 Python html.parser模块为我们提供了HTMLParser类,可以对其进行子类化以解析HTML格式的文本文件。
Python inspect模块 Python inspect模块是一个非常有用的模块,用于内省程序中的活动对象,并查看整个程序中使用的模块、类和函数的源代码。
Python发送邮件 发送邮件是任何软件程序中非常常见的任务,我们可以使用python smtplib模块在python程序中发送邮件。
Python tempfile模块 Python tempfile模块提供了简单的函数,通过这些函数我们可以创建临时文件和目录,并轻松访问它们。
Python SQLite Python sqlite3是一个优秀的模块,您可以使用它在应用程序中执行所有可能的数据库操作,包括内存数据库和持久性数据库。
Python shutil模块 Python shutil模块使我们能够轻松操作文件对象,而无需深入了解文件对象。它处理了创建文件对象、复制文件后关闭文件等低级语义,使我们能够专注于程序的业务逻辑。
Python timeit模块 Python timeit模块帮助我们测量一段Python代码的执行时间。timeit模块运行一段代码100万次(默认值),并考虑运行该代码所需的最短时间。
Python getpass模块 当我们希望用户通过终端输入密钥、密码或密码时,Python getpass模块是完美的选择。
Python urllib模块 Python urllib模块允许我们以编程方式访问URL数据。一些常见的用法包括调用REST Web服务,发出HTTP请求并读取响应数据。
Python pytz模块 Python pytz模块允许我们创建时区感知的datetime实例。
Python pendulum模块 Python Pendulum模块是内置datetime模块的直接替代品。Python pendulum模块支持时区,并提供了有用的方法来格式化、解析和日期时间操作。
Python arrow模块 Python Arrow模块是datetime的替代库。它是一个简单的模块,采用人性化的方法来创建、操作、格式化和转换日期、时间和时间戳。

Python 网络应用框架

主题 描述
Python Flask Python Flask模块允许我们在Python中创建Web应用程序。
Python Django 教程 学习如何开始使用Django框架创建一个简单的Web应用程序。
Django 模板
Django 模型
Django 表单
Django 模型表单

Python高级主题

主题 描述
Python NumPy Python NumPy是Python中科学计算的核心库。NumPy提供了高性能的多维数组对象和处理这些数组的工具。
Python 矩阵 矩阵在科学和数学方程中被广泛使用。Python NumPy模块支持矩阵的创建、加法、乘法、逆运算和转置操作。
Python 数学函数 Python math模块提供了对C标准定义的数学函数的访问。因此,我们可以借助Python数学函数执行许多复杂的数学运算。
Python hashlib 我们可以使用Python hashlib模块从源消息生成消息摘要或安全哈希。Python hashlib哈希函数接受可变长度的字节,并将其转换为固定长度的序列。这是一个单向函数。
Python Plotly Plotly的Python图形库可以在线制作交互式图表,并允许我们在需要时将其保存为离线版本。
Python Matplotlib Python matplotlib库帮助我们以最简单的方式在图表上绘制数据。如果您熟悉MATLAB绘图,那么Matplotlib的基本绘图使用将会很轻松。
Python SciPy Python SciPy库是一组基于NumPy和数学算法构建的便捷函数。
Python TensorFlow TensorFlow是一个用于数据流编程的库。它是一个符号数学库,也用于机器学习应用,如神经网络。
Keras 深度学习 Keras是一个高级神经网络API。它用Python编写,可以在Theano、TensorFlow或CNTK之上运行。
Python SciKit-learn Scikit-learn是Python的机器学习库。它具有多种回归、分类和聚类算法,包括SVM、梯度提升、k-means、随机森林和DBSCAN。
Python Seaborn Seaborn是一个用于在Python中制作统计信息图的库。它构建在matplotlib之上,还支持numpy和pandas数据结构。它还支持来自SciPy的统计单元。
Python StatsModels Python StatsModels允许用户探索数据、执行统计检验和估计统计模型。它旨在补充SciPy的stats模块。
Python Gensim Word2Vec Gensim是一个开源的向量空间和主题建模工具包。它用Python实现,使用NumPy和SciPy。它还使用Cython来提高性能。
NetworkX – Python 图形库 NetworkX是一个Python包,允许我们创建、操作和研究复杂网络的结构、功能和动态。
Bokeh Python 数据可视化 Bokeh是一个交互式Python数据可视化库,针对现代Web浏览器进行展示。

参考文献:

  • Python 内置函数
  • Python 内置类型
  • Python 3 官方文档
  • Python 维基百科页面
  • Python GitHub 源代码
  • Python 软件包索引 (PyPI)
  • Python Reddit 社区
bannerAds