python是条狗

Python简介

  python是吉多·范罗苏姆发明的一种面向对象的脚本语言,可能有些人不知道面向对象和脚本具体是什么意思,可是对于一个初学者来讲,如今并不须要明白。你们都知道,当下全栈工程师的概念很火,而Python是一种全栈的开发语言,因此你若是能学好Python,那么前端,后端,测试,大数据分析,爬虫等这些工做你都能胜任。前端

为何选择Python

  关于语言的选择,有各类各样的讨论,在这里我很少说,就引用Python里面的一个彩蛋来讲明为何要选择Python,在Python解释器里输入import this 就能够看到。python

 1 >>> import this
 2 
 3  
 4 
 5 The Zen of Python by Tim Peters
 6 
 7  
 8 
 9 Beautiful is better than ugly.
10 
11 Explicit is better than implicit.
12 
13 Simple is better than complex.
14 
15 Complex is better than complicated.
16 
17 Flat is better than nested.
18 
19 Sparse is better than dense.
20 
21 Readability counts.
22 
23 Special cases aren't special enough to break the rules.
24 
25 Although practicality beats purity.
26 
27 Errors should never pass silently.
28 
29 Unless explicitly silenced.
30 
31 In the face of ambiguity, refuse the temptation to guess.
32 
33 There should be one-- and preferably only one --obvious way to do it.
34 
35 Although that way may not be obvious at first unless you're Dutch.
36 
37 Now is better than never.
38 
39 Although never is often better than *right* now.
40 
41 If the implementation is hard to explain, it's a bad idea.
42 
43 If the implementation is easy to explain, it may be a good idea.
44 
45 Namespaces are one honking great idea -- let's do more of those! 

上面的话简单的总结来讲就是“优雅”、“明确”、“简单”,或许你仍是有些不明白,举个简单的例子,若果一样的功能你用C/C++写可能要写100行代码,而若是用Python写你可能只要20行代码就搞定,一样的若是一个问题有好几种解决方案,可是Python会用一种最简单的方法来实现。因此Python是用最简单最优雅最明确的方法来解决问题。后端

相关文章
相关标签/搜索