What’s Python
Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. – Official Document
Python作为一种动态编程语言,近年来获得了非常高的关注度。Python自身也在2.X基础上发展出了3.X系列,修改了部分语法,尽管使得编写相比以前更加麻烦,但是更好地实现了某些功能,也基本符合我们的阅读习惯。
在此之前,我们所接触的C或者C++,相比Python都有着巨大的不同。根据我目前的了解程度,主要表现在:
- C/C++都是编写-编译-运行,而Python实现了一次编写,处处运行,同样也就没有编译的过程,有解释器对语句解释执行
- Python作为动态语言,定义变量/函数时不需要指定数据类型,也不需要进行声明。一个列表可以包含多种类型数据
- Python拥有垃圾自动回收机制
这些基本特性配合上Python巨大的第三方库和友好的语法特点,极大地降低了学习成