学习 Python 的 12 个方式
Python

> 
> 这些资源将帮助你入门并熟练掌握 Python。
> 
> 
> 


![](/data/attachment/album/201908/29/083446r00gdsohb7lwxdxy.jpg)


Python 是世界上[最受欢迎的](https://insights.stackoverflow.com/survey/2019#most-popular-technologies)编程语言之一，它受到了全世界各地的开发者和创客的欢迎。大多数 Linux 和 MacOS 计算机都预装了某个版本的 Python，现在甚至一些 Windows 计算机供应商也开始安装 Python 了。


也许你尚未学会它，想学习但又不知道在哪里入门。这里的 12 个资源将帮助你入门并熟练掌握 Python。


### 课程、书籍、文章和文档


1、[Python 软件基金会](https://www.python.org/)提供了出色的信息和文档，可帮助你迈上编码之旅。请务必查看 [Python 入门指南](https://www.python.org/about/gettingstarted/)。它将帮助你得到最新版本的 Python，并提供有关编辑器和开发环境的有用提示。该组织还有可以来进一步指导你的[优秀文档](https://docs.python.org/3/)。


2、我的 Python 旅程始于[海龟模块](https://opensource.com/life/15/8/python-turtle-graphics)。我首先在 Bryson Payne 的《[教你的孩子编码](https://opensource.com/education/15/9/review-bryson-payne-teach-your-kids-code)》中找到了关于 Python 和海龟的内容。这本书是一个很好的资源，购买这本书可以让你看到几十个示例程序，这将激发你的编程好奇心。Payne 博士还在 [Udemy](https://www.udemy.com/teach-your-kids-to-code/) 上以相同的名称开设了一门便宜的课程。


3、Payne 博士的书激起了我的好奇心，我渴望了解更多。这时我发现了 Al Sweigart 的《[用 Python 自动化无聊的东西](https://automatetheboringstuff.com/)》。你可以购买这本书，也可以使用它的在线版本，它与印刷版完全相同且可根据知识共享许可免费获得和分享。Al 的这本书让我学习到了 Python 的基础知识、函数、列表、字典和如何操作字符串等等。这是一本很棒的书，我已经购买了许多本捐赠给了当地图书馆。Al 还提供 [Udemy](https://www.udemy.com/automate/?couponCode=PAY_10_DOLLARS) 课程；使用他的网站上的优惠券代码，只需 10 美元即可参加。


4、Eric Matthes 撰写了《[Python 速成](https://nostarch.com/pythoncrashcourse2e)》，这是由 No Starch Press 出版的 Python 的逐步介绍（如同上面的两本书）。Matthes 还有一个很棒的[伴侣网站](https://ehmatthes.github.io/pcc/)，其中包括了如何在你的计算机上设置 Python 以及一个用以简化学习曲线的[速查表](https://ehmatthes.github.io/pcc/cheatsheets/README.html)。


5、[Python for Everybody](https://www.py4e.com/) 是另一个很棒的 Python 学习资源。该网站可以免费访问 [Charles Severance](http://www.dr-chuck.com/dr-chuck/resume/bio.htm) 的 Coursera 和 edX 认证课程的资料。该网站分为入门、课程和素材等部分，其中 17 个课程按从安装到数据可视化的主题进行分类组织。Severance（[@drchuck on Twitter](https://twitter.com/drchuck/)），是密歇根大学信息学院的临床教授。


6、[Seth Kenlon](https://opensource.com/users/seth)，我们 Opensource.com 的 Python 大师，撰写了大量关于 Python 的文章。Seth 有很多很棒的文章，包括“[用 JSON 保存和加载 Python 数据](/article-11133-1.html)”，“[用 Python 学习面向对象编程](https://opensource.com/article/19/7/get-modular-python-classes)”，“[在 Python 游戏中用 Pygame 放置平台](/article-10902-1.html)”，等等。


### 在设备上使用 Python


7、最近我对 [Circuit Playground Express](https://opensource.com/article/19/7/circuit-playground-express) 非常感兴趣，这是一个运行 [CircuitPython](https://circuitpython.org/) 的设备，CircuitPython 是为微控制器设计的 Python 编程语言的子集。我发现 Circuit Playground Express 和 CircuitPython 是向学生介绍 Python（以及一般编程）的好方法。它的制造商 Adafruit 有一个很好的[系列教程](https://learn.adafruit.com/welcome-to-circuitpython)，可以让你快速掌握 CircuitPython。


8、[BBC:Microbit](https://opensource.com/article/19/8/getting-started-bbc-microbit) 是另一种入门 Python 的好方法。你可以学习如何使用 [MicroPython](https://micropython.org/) 对其进行编程，这是另一种用于编程微控制器的 Python 实现。


9、学习 Python 的文章如果没有提到[树莓派](https://www.raspberrypi.org/)单板计算机那是不完整的。一旦你有了[舒适](https://projects.raspberrypi.org/en/pathways/getting-started-with-raspberry-pi)而强大的树莓派，你就可以在 Opensource.com 上找到[成吨的](https://opensource.com/sitewide-search?search_api_views_fulltext=Raspberry%20Pi)使用它的灵感，包括“[7 个值得探索的树莓派项目](https://opensource.com/article/19/3/raspberry-pi-projects)”，“[在树莓派上复活 Amiga](https://opensource.com/article/19/3/amiga-raspberry-pi)”，和“[如何使用树莓派作为 VPN 服务器](https://opensource.com/article/19/6/raspberry-pi-vpn-server)”。


10、许多学校为学生提供了 iOS 设备以支持他们的教育。在尝试帮助这些学校的老师和学生学习用 Python 编写代码时，我发现了 [Trinket.io](https://trinket.io/)。Trinket 允许你在浏览器中编写和执行 Python 3 代码。 Trinket 的 [Python 入门](https://docs.trinket.io/getting-started-with-python#/welcome/where-we-ll-go)教程将向你展示如何在 iOS 设备上使用 Python。 


### 播客


11、我喜欢在开车的时候听播客，我在 Kelly Paredes 和 Sean Tibor 的 [Teaching Python](https://www.teachingpython.fm/) 播客上找到了大量的信息。他们的内容很适合教育领域。


12、如果你正在寻找一些更通用的东西，我推荐 Michael Kennedy 的 [Talk Python to Me](https://talkpython.fm/) 播客。它提供了有关 Python 及相关技术的最佳信息。


你学习 Python 最喜欢的资源是什么？请在评论中分享。


计算机编程可能是一个有趣的爱好，正如我以前在 Apple II 计算机上编程时所学到的……




---


via: <https://opensource.com/article/19/8/dozen-ways-learn-python>


作者：[Don Watkins](https://opensource.com/users/don-watkins) 选题：[lujun9972](https://github.com/lujun9972) 译者：[wxy](https://github.com/wxy) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
Python is [one of the most popular](https://insights.stackoverflow.com/survey/2019#most-popular-technologies) programming languages on the planet. It's embraced by developers and makers everywhere. Most Linux and MacOS computers come with a version of Python pre-installed, and now even a few Windows computer vendors are installing Python too.

Maybe you're late to the party, and you want to learn but don't know where to turn. These 12 resources will get you started and well on your way to proficiency with Python.

## Courses, books, articles, and documentation

- The
[Python Software Foundation](https://www.python.org/)has excellent information and documentation to help you get started on your coding journey. Be sure to check out the[Python for beginners](https://www.python.org/about/gettingstarted/)guide. It will help you get the latest version of Python and offers helpful tips on editors and development environments. The organization also has[excellent documentation](https://docs.python.org/3/)to guide you. - My Python journey began with the
[Turtle module](https://opensource.com/life/15/8/python-turtle-graphics). I first found answers to my questions about Python and the Turtle in Bryson Payne's. The book is a great resource, and buying it gives you access to dozens of example programs that will spark your programming curiosity. Dr. Payne also teaches an inexpensive course by the same title on[Teach Your Kids to Code](https://opensource.com/education/15/9/review-bryson-payne-teach-your-kids-code)[Udemy](https://www.udemy.com/teach-your-kids-to-code/). - Dr. Payne's book piqued my curiosity, and I yearned to learn more. This was when I discovered
by Al Sweigart. You can buy the book or use the online materials, which are identical to the print edition and freely available and shareable under a Creative Commons license. Thanks to Al, I learned Python basics, functions, lists, dictionaries, manipulating strings, and much more. It's a great book, and I have purchased many copies to donate to local libraries. Al also offers a course on[Automate the Boring Stuff with Python](https://automatetheboringstuff.com/)[Udemy](https://www.udemy.com/automate/?couponCode=PAY_10_DOLLARS); with a coupon code on his website, you can get it for only $10. - Eric Matthes wrote
, a step-by-step introduction to Python published (like the two books above) by No Starch Press. Matthes also has a wonderful[Python Crash Course](https://nostarch.com/pythoncrashcourse2e)[companion website](https://ehmatthes.github.io/pcc/)that includes how to set up Python on your computer as well as links to[cheat sheets](https://ehmatthes.github.io/pcc/cheatsheets/README.html)to ease the learning curve. [Python for Everybody](https://www.py4e.com/)is another great Python learning resource. The site offers free access to materials from[Charles Severance](http://www.dr-chuck.com/dr-chuck/resume/bio.htm)'s Coursera and edX certification courses. The site is divided into Get Started, Lessons, and Materials sections, with its 17 lessons well-organized by topic area, from installation to data visualization. Severance,[@drchuck on Twitter](https://twitter.com/drchuck/), is a clinical professor in the School of Information at the University of Michigan.[Seth Kenlon](https://opensource.com/users/seth), our master Pythonista at Opensource.com, has written extensively about Python. Seth has many great articles, including "[Save and load Python data with JSON](https://opensource.com/article/19/7/save-and-load-data-python-json)," "[Learn object-oriented programming with Python](https://opensource.com/article/19/7/get-modular-python-classes)," "[Put platforms in a Python game with Pygame](https://opensource.com/article/18/7/put-platforms-python-game)," and many more.

## Use Python on devices

- Recently I have become very interested in the
[Circuit Playground Express](https://opensource.com/article/19/7/circuit-playground-express), a device that runs on[CircuitPython](https://circuitpython.org/), a subset of the Python programming language designed for microcontrollers. I have found that the Circuit Playground Express and CircuitPython are great ways to introduce students to Python (and programming in general). Its maker, Adafruit, has an excellent[series of tutorials](https://learn.adafruit.com/welcome-to-circuitpython)that will get you up to speed with CircuitPython. -
A

[BBC:Microbit](https://opensource.com/article/19/8/getting-started-bbc-microbit)is another great way to get started with Python. You can learn how to program it with[MicroPython](https://micropython.org/), another Python implementation for programming microcontrollers. - No article about learning Python would be complete without mentioning the
[Raspberry Pi](https://www.raspberrypi.org/)single-board computer. Once you[get comfortable](https://projects.raspberrypi.org/en/pathways/getting-started-with-raspberry-pi)with the mighty Pi, you can find a[ton of ideas](https://opensource.com/sitewide-search?search_api_views_fulltext=Raspberry%20Pi)on Opensource.com for using it, including "[7 Raspberry Pi projects to explore](https://opensource.com/article/19/3/raspberry-pi-projects)," "[Resurrecting the Amiga on the Raspberry Pi](https://opensource.com/article/19/3/amiga-raspberry-pi)," and "[How to use your Raspberry Pi as a VPN server](https://opensource.com/article/19/6/raspberry-pi-vpn-server)." - A lot of schools provide students with iOS devices to support their education. While trying to help teachers and students in these schools learn to code with Python, I discovered
[Trinket.io](https://trinket.io/). Trinket allows you to write and execute Python 3 code in a browser. Trinket's[Getting started with Python](https://docs.trinket.io/getting-started-with-python#/welcome/where-we-ll-go)tutorial will show you how to use Python on your iOS device.

## Podcasts

- I enjoy listening to podcasts when I am driving, and I have found a wealth of information on
[Teaching Python](https://www.teachingpython.fm/)with Kelly Paredes and Sean Tibor. Their content is well-tuned to the education space. - If you're looking for something a little more general, I recommend Michael Kennedy's
[Talk Python to Me](https://talkpython.fm/)podcast. It offers excellent information about what's going on in Python and related technologies.

What is your favorite resource for learning Python? Please share it in the comments.

## 4 Comments