Previously, I learned about C + +, after the first contact with Python, there is a similar concept of hate, recently began to contact Python, is reading a concise Python tutorial, encountered Python's own grammatical characteristics. indentation in Python represents a block in Python, and indentation is important;Python is case-sensitive;In python, the end of a (colon) indicates that the next line opens a block;
1, python operator: * * To return x to the Y-square;//Take the integer portion of the returned quotient
Control if and for (no swich) break continue, can take an else block
The function (1) assigns a value to the function outside of the function, declares the variable globally, and global varname
(2) Key parameters use function name (key parameter) instead of variable position to assign parameter position to function
(3) pass represents an empty block, function has no entity, and pass represents an empty block
Dosstrings is enclosed in "" "(three quotation marks), the first line begins with a full stop, the second behaves as a blank line, the third behavior interprets the body of the string (cannot appear in Chinese), and the first line begins at the function block.
The __doc__ call is printed with the object's function name, and the Help () is a dosstrings.
Python Learning notes (i)