#! /usr/bin/python
The first line: The interpreter that executes the script notification content to be opened;
Import Platform
The second line: Importing a Python module platform via import;
Print Platform.uname ()
The third line: print the execution result of the Uname method of the Platform module;
Finally give the script executable permission;
2:python scripts can be divided into: modules, statements, expressions, objects;
- The program has a modular structure
- Module contains statements
- Statement contains an expression
- expression creation and processing of an object
Note: Everything in Python is an object;
3: Expression is "something"; for example: 3+4
4: The statement is "doing something"; For example: print "3+4"
5: Features of statements: they change things;
6: The assignment statement changes the variable;
The 7:print statement changes the screen output;
Second: The language is divided into
Process oriented
The instruction is the center, the instruction processes the data, how to organize the code to solve the problem;
Object oriented
Data-centric, all the processing code around the data expansion, how to design data structures, organize and provide the data to allow processing operations;
Marco-python-class notes 01-python