版权声明:文章版权归本博客所以未经许可不能转载 https://blog.csdn.net/u011738045/article/details/82423399
目录
python的安装
可以通过mac包管理器Homebrew来安装具体参考我之前文章
https://blog.csdn.net/u011738045/article/details/82420299
https://blog.csdn.net/u011738045/article/details/82421539
https://blog.csdn.net/u011738045/article/details/82421884
https://blog.csdn.net/u011738045/article/details/82422062
交互模式
通过全局安装pyton,终端输入命令Python进去的就是交互模式,
此模式用于一些简单的语法测试,学习使用方便快捷, ipython ,也是和Python一样只不过是ipython功能更加强大,可以输入命令,
Python中的中文
在Python2中中文不识别只要你文件有中文不管是注释也会都会不识别运行时候回报错,Python3中没有这个问题所以在顶行写入
#coding=utf-8
或者是
# -*- coding:utf-8 -*-
第二种方式官方推荐使用,比较友好
python注释
#号单行注释
''' ''' 多行注释