说明
Python 的 3.0 版本,常被称为 Python 3000,或简称 Py3k。相对于 Python 的早期版本,这是一个较大的升级。为了不带入过多的累赘,Python 3.0 在设计的时候没有考虑向下兼容。
python 安装
请参考:
翻译:在Mac上将Python 3设置为默认的正确和错误方法
Hello World
打开命令行 Terminal
# 查看 python 版本
$ python -V
Python 3.8.5
# 进入 python 命令行
$ python
Python 3.8.5 (default, Oct 3 2020, 11:14:07)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print('Hello World')
Hello World
>>> 3+2
5
>>>
pycharm IDE 安装
写一下Hello World 代码,运行快捷键 control + shift + r
, 调试快捷键control + shift + d
,或者点击下面绿色的运行按钮。
学习资源
https://www.runoob.com/python3/python3-tutorial.html
https://wiki.python.org/moin/BeginnersGuide
如何学习
基础教程挨个敲打一遍,再学习一下高级教程多线程编程, 1天左右时间足以。学习完以后,要在于多应用。比如笔者就可以用python写LeetCode算法。
- 算法:深拷贝链表,其中链表有个随机指向的指针Copy List with Random Pointer
- 算法:把排好序的链表转换为二叉排序树Convert Sorted List to Binary Search Tree
再写个爬虫练练手,待续…