KEEPFRDS

 找回密码
 立即注册
查看: 29|回复: 4

[软件] [转载] What is Python for ?

[复制链接]
恒博快乐 发表于 2017-4-16 12:55 | 显示全部楼层 |阅读模式
本帖最后由 rpw 于 2016-11-22 16:07 编辑

这个网站上转过来的,大家有兴趣可以认真看看~~~~(原谅楼主的翻译能力有限undefined,就不提供翻译来干扰大家了undefined)


When I need to build a web app, I reach for Python. When I need to automate some small task on my system, I reach for Python. When I want to find the most common colors in an image, I reach for Python. When I…OK, I think you get the picture. Basically, when I need to code something and the language doesn’t matter, I use Python. So what is Python?

Python is a general purpose programming language created in the late 1980s, and named after Monty Python, that’s used by thousands of people to do things from testing microchips at Intel, to powering Instagram, to building video games with the PyGame library. It’s small, very closely resembles the English language, and has hundreds of existing third-party libraries.

So what are the major reasons why I, personally, choose Python and recommend it to as many people as possible? It comes down to three reasons.

Readability

Python very closely resembles the English language, using words like ‘not’ and ‘in’ to make it to where you can very often read a program, or script, aloud to someone else and not feel like you’re speaking some arcane language. This is also helped by Python’s very strict punctuation rules which means you don’t have curly braces ({ }) all over your code.

Also, Python has a set of rules, known as PEP 8, that tell every Python developer how to format their code. This means you always know where to put new lines and, more importantly, that pretty much every other Python script you pick up, whether it was written by a novice or a seasoned professional, will look very similar and be just as easy to read. The fact that my Python code, with five or so years of experience, looks very similar to the code that Guido van Rossum (the creator of Python) writes is such an ego boost.

Libraries

Python has been around for over 20 years, so a lot of code written in Python has built up over the decades and, being an open source language, a lot of this has been released for others to use. Almost all of it is collected on https://pypi.python.org, pronounced “pie-pee-eye” or, more commonly called “the CheeseShop”. You can install this software on your system to be used by your own projects. For example, if you want to use Python to build scripts with commandline arguments, you’d install the “click” library and then import it into your scripts and use it. There are libraries for pretty much any use case you can come up with, from image manipulation, to scientific calculations, to server automation.

Community

Python has user groups everywhere, usually called PUGs, and does major conferences on every continent other than Antarctica. PyCon NA, the largest Python conference in North America, sold out its 2,500 tickets this year. And, reflecting Python’s commitment to diversity, it had over 30% women speakers. PyCon NA 2013 also started a trend of offering “Young Coder” workshops, where attendees taught Python to kids between 9 and 16 years of age for a day, getting them familiar with the language and, ultimately, helping them hack and mod some games on the Raspberry Pis they were given. Being part of a such a positive community does a lot to keep you motivated.

I’m very excited to be able to share my favorite language with the Treehouse community and hopefully the pieces of Python that I love the most will help you decide to check it out and learn it with me.

Here’s a short video of Kenneth giving examples of the best uses of Python.


           视频链接
[backcolor=rgba(0, 0, 0, 0.8)]https://youtu.be/-67hh86N42Q

Python都是一门值得极力推荐被学习的编程语言。不需要花费太多的学习成本(时间、精力)(相对于其他大部分语言)就可以掌握它,然后可以用它来解决生活中的很多事情(只要你想得到),所以还等什么,人生苦短,快用Python

回复

使用道具 举报

longwayhome 发表于 2017-7-6 16:33 | 显示全部楼层
Python !!!现如今程序员的学习成本确实降低了 !


回复 支持 反对

使用道具 举报

idema 发表于 2017-9-12 15:58 | 显示全部楼层
网络爬虫用python的多,非常实用,值得好好去学习一下!
回复 支持 反对

使用道具 举报

信條 发表于 2017-10-1 23:43 | 显示全部楼层
编程入门 Phthon 确实更加容易上手,学习起来性价比高
回复 支持 反对

使用道具 举报

czrsmcn 发表于 2018-1-8 01:26 | 显示全部楼层
的确网络爬虫用python,学习起来更易上手。入门编程!!!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Keep Friends

GMT+8, 2019-5-24 01:30 , Processed in 0.072203 second(s), 8 queries , Gzip On, APC On.

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表