geekdoc-python-zh/docs/pythonlibrary/python-101-learning-about-l...

26 lines
841 B
Markdown

# Python 101 -了解循环(视频)
> 原文:<https://www.blog.pythonlibrary.org/2020/09/04/python-101-learning-about-loops-video/>
在本教程中,您将学习如何在 Python 中使用 for 和 while 循环。
具体来说,您将学习如何:
* 创建一个`for`循环
* 在字符串上循环
* 循环查阅字典
* 从元组中提取多个值
* 将`enumerate`用于循环
* 创建一个`while`循环
* 环路中断
* 使用`continue`
* 将`else`用于循环
* 嵌套循环
[https://www.youtube.com/embed/2fdhYGmucow?feature=oembed](https://www.youtube.com/embed/2fdhYGmucow?feature=oembed)
| [![](img/9437a5e03f2225dbc315c4e7e5b908b3.png)](https://leanpub.com/py101/) | 你想了解更多关于 Python 的知识吗?
### Python 101 -第二版
**[在 Leanpub](https://leanpub.com/py101) 上立即购买** |