Python is a simple, easy-to-learn, powerful, and easy-to-maintain scripting language.
Python includes: String, variable, identifier, data type, object, operator and expression, control flow, function, module.
Python considerations:
1.In pythonIndent(Space and Tab) is used to determine the indentation level of the logical line and determine the grouping of statements. Statements at the same level must have the same indentation. Incorrect indentation may cause errors.
For example, create the test. py file in the Linux Command window, for example,
Write two lines of code in test. py, with different indentation. For example, save and exit (: WQ !)
Enter Python test. py in the Linux Command window and press Enter. For example, an error is returned because the indentation of the second line of code is different from that of the first line.
2. Python Comments start with #, for example #! The comments started in this form are called organizational lines, used to tell which interpreter should be run on the Linux/Unix system in use
When #! is added to the top of the python file #! /Usr/bin/Python organize rows. You can run Python files in the following ways.
The chmod command is used to changeFile mode. To permit all users in the system to execute the source file, you can run the program by specifying the location of the source file .. /Indicates that the program is located in the current directory.
Even if we change the file nametest
And then run./Test. This program can still work because the system knows that it must run the program using the interpreter specified in the first line of the source file.
3.Get help from a python function or statement through help ()
For example
Press Q to exit the help