学习 Python 的好文章
Python

> 
> 无论你在 Python 编程过程中处于什么阶段，这些 Python 热门文章将会对你有很大帮助。
> 
> 
> 


![](/data/attachment/album/202101/15/231657xt8085wtyk5yvsz5.jpg)


2019 年是 Python 的好年景。根据 [GitHub](https://octoverse.github.com/#top-languages) 和 [Stack Overflow](https://insights.stackoverflow.com/survey/2019) 的受欢迎资源程度来看，它正在成为全球第二大流行语言。（LCTT 译注：原文发表于 2019 年底，但是这里提及的文章并没有过时。）



> 
> “在我们的调查中，Python 作为增长最快的程序设计语言，在程序设计语言中排名再次上升，今年排在 Java 之前，成为第二大最受欢迎的程序设计语言（仅次于 Rust ）。”
> 
> 
> — [Stack Overflow Insights](https://insights.stackoverflow.com/survey/2019)
> 
> 
> 


同样，Python 的读者人数呈跳跃式激增。以下是按主题分组的 2019 年以来最热门的 Python 文章，供你仔细阅读。


### 为什么选择 Python ？


在众多的程序设计语言中，是什么使 Python 成为首选呢？从文章的阅读量来看，那就是因为它的灵活性。正如 Jigyasa Grover 解释的那样，Python 开发人员可以使用 [多种范例](https://opensource.com/article/19/10/python-programming-paradigms)，包括 Seth Kenlon 教程所展示的流行的 [面向对象程序设计](https://opensource.com/article/19/7/get-modular-python-classes)。


如果你是 Python 的长期用户，并且正在寻找 Python 为什么是完美的程序设计语言的高级例子，那么可以看 Moshe Zadka 的 [喜欢 Python 的 5 大理由](https://opensource.com/article/19/10/why-love-python)。如果这还不够的话，你也可以使用功能强大的工具来尝试，无需编写大量代码，例如 Parul Pandey 关于 [图像处理](/article-10679-1.html) 的教程。


### 配置 Python


随着 Python 的受欢迎程度不断提高，使用它的人越来越多。这些新手中的许多人都是在 Mac 操作系统上进行的，并且正在使用 Moshe 和我写的 [Python3 配置向导](https://opensource.com/article/19/5/python-3-default-mac)。


安装 Python 之后，接下来就是决定利用什么工具编写代码。关于文本编辑器和集成开发环境（IDE），有很多选择，但是读者似乎更喜欢图形界面，在有关该主题的文章中，Stephan Avenwedde 的关于 [Pythonic](https://opensource.com/article/19/5/graphically-programming-pythonic) 和我关于 [JupyterLab](https://opensource.com/article/19/5/jupyterlab-python-developers-magic) 的文章的读者最多。


在对程序设计语言充满信心的途径上，开发人员将不得不面对众多选择，来管理程序设计语言的版本和项目依赖。幸运的是，László Kiss Kollár 的文章 [Python 包管理](https://opensource.com/article/19/4/managing-python-packages) 让其变得更加容易。


当你准备好配置一个具有所有功能的 IDE，以最大限度地利用这门语言时，请一定尝试一下 [linter Black](/article-10864-1.html)，如 Moshe 说的，保持代码的清洁。


### 小结


无论你处在 Python 程序设计的哪个阶段，这些热门 Python 文章都将为你提供帮助。如果没有至少一次对测试重要性的认可，我无法对此进行总结，为此，Moshe 提供了另一篇 [关于 tox](https://opensource.com/article/19/5/python-tox) 的好文章。




---


via: <https://opensource.com/article/19/12/learn-python>


作者：[Matthew Broberg](https://opensource.com/users/mbbroberg) 选题：[lujun9972](https://github.com/lujun9972) 译者：[stevenzdg988](https://github.com/stevenzdg988) 校对：[wxy](https://github.com/wxy)


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


OK
Python had a big year in 2019. According to popular resources like [GitHub](https://octoverse.github.com/#top-languages) and [Stack Overflow](https://insights.stackoverflow.com/survey/2019), it's trending as the second most popular language in the world.

"Python, the fastest-growing major programming language, has risen in the ranks of programming languages in our survey yet again, edging out Java this year and standing as the second most loved language (behind Rust)."


—[Stack Overflow Insights]

Similarly, Python grew in readership on Opensource.com by leaps and bounds. Here are the top Python articles from 2019, grouped by topic, for your perusal.

## Why choose Python?

There are many languages out there, so what makes Python such a destination? If the most-read articles tell us anything, it's that people enjoy its flexibility. There are [multiple paradigms](https://opensource.com/article/19/10/python-programming-paradigms) that are accessible to Python developers, as Jigyasa Grover explains, including the popular [object-oriented programming](https://opensource.com/article/19/7/get-modular-python-classes) Seth Kenlon's tutorial shows.

If you're a long-time user and looking for advanced examples of why Python is a perfect language, Moshe Zadka covers his [top 5 reasons for loving Python](https://opensource.com/article/19/10/why-love-python). If that's not enough, you can also use it play around with powerful tools without a lot of code, like in Parul Pandey's tutorial on [image manipulation](https://opensource.com/article/19/3/python-image-manipulation-tools).

## Configuring Python

As Python's popularity continues to rise, more people are starting with the language than ever before. Many of those first-timers are doing so on the Mac operating system and are using a [guide to setting up Python 3](https://opensource.com/article/19/5/python-3-default-mac) that Moshe and I wrote.

After installing Python, decisions on where to write your code come next. There are many options when it comes to text editors and integrated development environments (IDEs), but readers appear to favor graphical options, as Stephan Avenwedde's article about [Pythonic](https://opensource.com/article/19/5/graphically-programming-pythonic) and my article on [JupyterLab](https://opensource.com/article/19/5/jupyterlab-python-developers-magic) were the most read articles on that topic in 2019.


On the path to getting confident with the language, developers will have to face the multitude of options available for how to manage versions of the language and project dependencies. Luckily, László Kiss Kollár's article makes [managing Python packages](https://opensource.com/article/19/4/managing-python-packages) a bit simpler.

When you're ready to configure an IDE with all of the features you'll want to make the most of the language, be sure to give the [opinionated linter Black](https://opensource.com/article/19/5/python-black) a try, as Moshe explains, to keep your code clean.

## Wrapping up

No matter where you are in your path to enjoying Python programming, the top Python articles from 2019 are here to help you along the way. I can't wrap this up without at least one acknowledgment of the importance of testing, and Moshe offers another well-read article [on tox](https://opensource.com/article/19/5/python-tox) for that purpose.

Thank you to all the authors who wrote for Opensource.com in 2019! If you're just learning to program in Python, let us know in the comments what you want to know. And, if you're a seasoned veteran, consider sharing your tips and tricks with us by [writing an article](https://opensource.com/how-submit-article) about your favorite Python topic.

## Comments are closed.