THE WORLD'S LARGEST WEB DEVELOPER SITE

Python 教程

Python主页 Python简介 Python入门 Python语法 Python注释 Python变量 Python数据类型 Python数字 Python转换 Python字符串 Python布尔值 Python运算子 Python列表 Python元组 Python集 Python字典 Python If...Else Python While循环 Python的循环 Python函数 Python Lambda Python数组 Python类/对象 Python继承 Python迭代器 Python范围 Python模块 Python日期 Python数学 Python JSON Python正则表达式 Python PIP Python Try...Except Python用户输入 Python字符串格式

文件处理

Python 文件处理 Python读取文件 Python写入/创建文件 Python删除文件

Python NumPy

NumPy简介 NumPy入门 NumPy创建数组 NumPy数组索引 NumPy数组切片 NumPy数据类型 NumPy复制与视图 NumPy阵列形状 NumPy数组重塑 NumPy数组迭代 NumPy数组连接 NumPy数组拆分 NumPy数组搜索 NumPy数组排序 NumPy数组过滤器 NumPy随机 NumPy ufunc

机器学习

入门 平均中位数模式 标准偏差 百分位 资料分配 Normal 资料分配 散点图 线性回归 多项式回归 多重回归 规模 训练/测试 决策树

Python MySQL

MySQL入门 MySQL创建数据库 MySQL创建表 MySQL输入sert MySQL选择 MySQL位置 MySQL排序依据 MySQL删除 MySQL删除表 MySQL更新 MySQL限制 MySQL连接

Python MongoDB

MongoDB入门 MongoDB创建数据库 MongoDB创建集合 MongoDB插入 MongoDB查找 MongoDB查询 MongoDB排序 MongoDB删除 MongoDB Drop集合 MongoDB更新 MongoDB限制

Python参考

Python概述 Python内置函数 Python字符串方法 Python列表方法 Python字典方法 Python元组方法 Python Set方法 Python文件方法 Python关键字 Python异常 Python词汇表

Module 参考

随机模块 请求模块 数学模块 c数学模块

Python如何

删除列表重复项 反转字符串 ADD 两个数字

Python 示例

Python 示例 Python编译器 Python 练习 Python 测试 Python 证书

Python 练习


You can test your Python skills with W3Schools' 练习.


练习

We have gathered a variety of Python exercises (with answers) for each Python Chapter.

Try to solve an exercise by filling in the missing parts of a code. If your stuck, hit the "Show Answer" button to see what you've done wrong.

Count Your Score

You will get 1 point for each correct answer. Your score and total score will always be displayed.

Start Python 练习

Good luck!

Start Python 练习 ❯

If you don't know Python, we suggest that you read our Python Tutorial from scratch.


W3Schools Certification

W3Schools' Online Certification

The perfect solution for professionals who need to balance work, family, and career building.

More than 25 000 certificates already issued!

Get Your 证书 »

The HTML证书 documents your knowledge of HTML.

The CSS证书 documents your knowledge of advanced CSS.

The JavaScript 证书 documents your knowledge of JavaScript and HTML DOM.

The Python 证书 documents your knowledge of Python.

The jQuery证书 documents your knowledge of jQuery.

The SQL证书 documents your knowledge of SQL.

The PHP 证书 documents your knowledge of PHP and MySQL.

The XML 证书 documents your knowledge of XML, XML DOM and XSLT.

The Bootstrap 证书 documents your knowledge of the Bootstrap framework.




W3Schools is optimized for learning, testing, and training. 示例 might be simplified to improve reading and basic understanding. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 1999-2020 by Refsnes Data. All Rights Reserved.
Powered by W3.CSS.

W3Schools.com