I’m learning Operating System these days, and I met tasks should be solved by python, and I write this note to record the things I have learnt so that I can understand it better and may be useful for other learners. I use RUNOOB(http://www.runoob.com/python) to learn. I may quote some places of this website and I express my thanks here.
-
简介
-
英文意思是“巨蟒”,我们的Python可是一条很可爱的小蟒蛇!名字的来源是因为它的创造者——Guido van Rossum在1989年的圣诞,在阿姆斯特丹闲着没事儿,就变个脚本解释型语言来继承Guido非常喜欢的ABC编程语言。Python的设计理念是“优雅”,“明确”,“简单”。时间越长越是凸显着个理念的正确性,“less is more”的观念被越来越多的人们所认可,我想这也是Python越来越火爆的原因之一。在代码中加入“import this”就可以看到Python的设计格言。(I also have a friend called Guido, and he lives in Amsterdam, you comment below or contact me if you want his photo and if he permits, BTW, he has really charming eyes. ;))
-
-
特点
-
解释形语言:不需要编译,类似PHP
-
交互式语言:互动执行程序
-
面向对象:像C++一样可以封装
-
初学者语言:支持广泛的程序开发
-
安装环境
-
运行
-
我用创建一个文件叫hello.py,用普通编辑器打开,编辑:
-
-
用cmd打开命令框
-
-
运行成功啦!
-
中文编码
-
这个python喜欢英文,你要输出中文得先打声招呼:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
(第一h行是告诉系统:我开始执行Python程序啦!第二行:中文编码,打招呼
试着运行一下:

