python 学习笔记(0)——开始之前

python 学习笔记(0)——开始之前

Contents

开始之前

这里学习的是 Python 3.7.x,前面 Python2.0 系列虽然还有使用,但好像开始向后兼容了?反正不学就是了。

这里参考的都是这个资料,写的十分良心。

Python 特点

优点

  1. 简单易写、容易上手
  2. 开放源代码
  3. 可拓展性、可嵌入性
  4. 规范程度高
  5. 对面向对象和函数式编程都有支持

缺点

  1. 执行效率稍低
  2. 代码无法加密
  3. 选择太多导致错误易发生

应用领域

Web 应用开发、云基础设施、DevOps、网络数据采集(爬虫)、数据分析挖掘、机器学习等领域。

其他

解释器安装

这官网应该挺容易吧。

特别的提醒

Python 语句不需要打 ; 结尾,并且大多数用法都会在最后加上 :

Python 之禅

输入:

import this

会看见以下结果:

The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

这不用翻译了吧。

 

点赞 0

No Comments

Add your comment