评论删除后,数据将无法恢复
Python is a favorite among many developers for its strong emphasis on readability and efficiency, especially when compared to other languages like Java, PHP, and C++.
Sure, it’s old, but it’s 1980s old — not Cobol or Fortran old. Besides, if something works, why change it (especially when there are so many ways to improve it)?
Actually, depending on how you view it, longevity is a good thing in itself — a sign of stability and reliability.
If you’re like many people who first started out with Java, C, or Perl, the learning curve for Python is practically nonexistent. But the fact that it’s easy to learn is also the reason why some people don’t see Python as a necessary programming skill.
I’ll be honest with you, my love of Python didn’t really develop until a few years ago. It took a long career of painful lessons to appreciate everything this language and platform have to offer. My goal with this short post is to save you the same pain and convince you why Python is something you need to know.
Well, at least it’s “easier” compared to many of the other programming languages available to you. There isn’t a lot of ceremony to Python’s syntax, which makes it readable even when you’re not a Python expert. My experience is that learning and teaching Python through examples is easier than approaching, say, Ruby or Perl the same way, since the syntax of Python has far fewer rules and special cases. The focus isn’t on language intricacies; it’s on what you want to accomplish with your code.
Python is a quick study for anyone. With practice, you can easily build a rudimentary game in two days, tops (and that’s after knowing absolutely nothing about programming).
Another factor that makes Python an attractive programming language for novices is its readability and efficiency.
Python will be 28 years old in 2017. Even though that’s older than many of my readers, it remains highly relevant because it can be applied to pretty much any software development or operations scenario you can find today. Managing local or cloud infrastructure? Python applies. Developing websites? Yep, it applies there too. Need to work against a SQL database? It does that. Need a custom function for Hive or Pig? Covered. Just building a small tool for yourself? Python’s simplicity makes it a great choice. Need a language that supports the rigor of object-oriented design? Python’s features make it relevant here, too. In short, investing a little effort into learning Python will give you skills that apply across a wide range of job roles.
Once you know the language, you can leverage the platform. Python is backed by PyPI (pronounced Pie-Pie and perusable online here), which is a repository of more than 85,000 Python modules and scripts that you can use immediately. These modules deliver prepackaged functionality to your local Python environment and solve problems as diverse as working with databases, implementing computer vision, executing advanced data analytics such as sentiment analysis, or building RESTful web services.
Whatever job you’re reaching for, data will be a part of it. IT ops, software development, marketing, etc. — they’re all drowning in data and thirsting for wisdom. Soon data analytics skills will be as necessary as coding skills, and Python has a strong presence in both areas. Next to the language R, Python is the most used language in modern data science; in fact, Python job postings outnumber R postings in the data science arena. The skills you develop learning Python will transfer directly to building these analytics skills.
Python’s been running cross-platform and open source for more than 20 years. If you need code that works on Linux, Windows, and MacOS, Python provides. Moreover, it’s backed by decades of bug-squashing and kink-straightening to ensure that your code works as intended wherever you run it.
There are several robust Python implementations integrated with other programming languages.
CPython, a version with C.
Jython, or Python integrated with Java.
IronPython, which is designed for compatibility with .NET and C#.
PyObjc, or Python written with ObjectiveC toolkits.
RubyPython, or Python combined with Ruby.
There aren’t a lot of languages that can offer the versatility and simplicity of Python; there are even fewer that can do so alongside decades of thought, effort, and community that has gone into Python. Whether you’re new to code or a script-spewing guru, Python is something you need to know.
评论删除后,数据将无法恢复
评论(21)
引用来自“ichynul”的评论
除非取消强行缩进引用来自“Raymin”的评论
是啊!学 Python 多年,至今不知该如何破如下难题:x = 1
y = 2
if x == 1:
x += 1
y += 2
print(x, y)
Python 应该有一个哪怕是可选的 end 关键字,就更完美了。
引用来自“xshrim”的评论
讨厌的就是end关键字,这种关键字让我感觉是上个世纪的语言,平白多打字。Python的强制缩进非常好,我现在写代码都强迫症了,必须满足编写规范才舒服。或许是你们自己被其他语言套上了枷锁而已。引用来自“ichynul”的评论
除非取消强行缩进引用来自“Raymin”的评论
是啊!学 Python 多年,至今不知该如何破如下难题:x = 1
y = 2
if x == 1:
x += 1
y += 2
print(x, y)
Python 应该有一个哪怕是可选的 end 关键字,就更完美了。
引用来自“ichynul”的评论
除非取消强行缩进x = 1
y = 2
if x == 1:
x += 1
y += 2
print(x, y)
Python 应该有一个哪怕是可选的 end 关键字,就更完美了。