First, Introduction:
Python: scripting language, interpreted language
Operation and maintenance of the necessary language, the application of the field is very broad, the future is broad.
Indentation is a very important point in Python syntax.
Python3 is the future development trend
Second, Python installation:
Windows:
1. Download the installation package:
https://www.python.org/downloads/
默认安装路径:C:\python2.7
3、配置环境变量
【右键计算机】--》【属性】--》【高级系统设置】--》【高级】--》【环境变量】--》【在第二个内容框中找到 变量名为Path 的一行,双击】 --> 【Python安装目录追加到变值值中,用 ; 分割】
如:原来的值;C:\python27,切记前面有分号
linux & mac
自带安装
三、第一个python程序
print ("Hello World")
Specify interpreter: If you want to execute a python script like executing a shell script, for example: ./HELLO.PY 
#!/usr/bin/env python
1、Variable names can only be any combination of letters, numbers, or underscores
2. The first character of a variable name cannot be a number
3. Variable name cannot be a keyword
4, the variable name can not contain spaces and special characters (_ except)
Code:-*-coding:utf-8-*-
Five, module
Python has a rich and powerful library of standards and third-party libraries, which can be implemented in a non-language comparable capacity.
Import Sys
Print (Sys.path)
Import OS
Os.system ("df-th") #调用系统命令
Customizing the TAB Completion module
Import Sys
Import ReadLine
Import Rlcompleter
if sys.platform = = ' Darwin ' and sys.version_info[0] = = 2:
Readline.parse_and_bind ("Bind ^i Rl_complete")
Else
Readline.parse_and_bind ("Tab:complete") # Linux and Python3 on Mac
For Mac
This article is from the "LE" blog, please be sure to keep this source http://lz001.blog.51cto.com/8294567/1792820
Python Learning-baseno.1