Python is becoming(probably it has been) one of the most popular languages. As a C++ developer, I want to write simple toolkits with a script language on a much-more light-weight level. Python seems to be a good choice with its powerful API libraries.
After going through the first 7 chapters of the tutorial, python has 2 different points from other main developing languages,
1. Statement grouping is done by indentation instead of beginning and ending brackets "{}".
2. No variable or argument declarations are necessary.
There are 2 ways to enter the interactive mode of python,
1. Typing python in the cmd window.
2. Start up IDLE which is the GUI of python.
Mainly we can get the same result from both of them, but they have some difference in details.
I'm used to typing my code in IDLE unless some effect can not be achieved according to the tutorial.
The first easy function in python is,
It contains a lof of information to the basic syntax and grammar,
1. def is used to define a function.
2. the function argument is not give an explicit type.
3. the "=" can be used as vector expression.
4. "()" is not needed in a "while" loop(so is other flow control syntax, such as "if", "for" etc.).
5. ":" is essential for write a sub-block of code.
6. format print is possible in sys function "print".