11. Extensions and modules easily written in C, C++ (or Java for Jython, or .NET languages for IronPython)
12.
13. Guido van Rossum (Python's principal author, and his continuing central role in deciding the direction of Python is reflected in the title given to him by the Python community, Benevolent Dictator for life(BDFL))
14.
15. Python 3.0 (also known as Python 3000 or py3k was released on 3 December 2008 after a long period of testing.
16.
17.
18.
19.
20.
21.
22.
23. Basic Syntax # # comment # line continuation ; # statement separator (like C) None # NULL not # logical/boolean not returns True/False == != < > <= >= # equality, relational is # object identity is not ** # power (x^y) // # floor division (truncates to integer)
24. float(123) float('123.0') # convert integer/string to float int(1.5) # convert to integer (truncate) bool(x) # convert to boolean hex(15) # convert to string in hex format int('101',2) # convert to int from binary number in string
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39. Assert statements are a convenient way to insert debugging assertions into a program.
43. Import statements are executed in two steps: (1) find a module, and initialize it if necessary; (2) define a name or names in the local namespace (of the scope where the import statement occurs).
66. Parsing & Optimization (Compilation) Parsing involves checks to ensure the program being executed conforms to the language specication and builds a parse tree internally which describes the program in terms of microoperations internal to Perl (opcode).
67.
68.
69.
70.
71.
72.
73. Arithmetic operators manipulate on numeric scalar data. Perl can evaluate an arithmetic expression, in a way similar to our daily-life mathematics. Operator Description + Addition operator - Subtraction operator * Multiplication operator / Division operator % Modulus operator + Positive sign - Negative sign ++ Autoincrement operator -- Autodecrement operator ** Exponentiation operator
74. Comparison operators are used to compare two pieces of scalar data, e.g. alphabetically or numerically and returns a Boolean value. In Perl, there are two sets of comparison operators. The rst set compares the operands numerically: Operator Description < less than > greater than <= less than or equal to >= greater than or equal to <=> general comparison
75. The second set compares the operands stringwise: Operator Description lt less than gt greater than le less than or equal to ge greater than or equal to cmp general comparison
76. Equality operators compares two pieces of scalar data and returns if their values are identical. They may be considered special cases of comparison operators. Operator Description == equal (numeric comparison) != not equal (numeric comparison) eq equal (stringwise comparison) ne not equal (stringwise comparison)
77. Bitwise operators provide programmers with the capability of performing bitwise calculations. Operator Description << Binary shift left >> Binary shift right & Bitwise AND | Bitwise OR ˆ Bitwise XOR ~ Bitwise NOT
78. Logical operators can be used to do some Boolean logic calculations. Operator Description || or Logical OR && and Logical AND ! not Logical NOT, i.e. negation xor Logical XOR.Exclusive OR
79. test1 test2 and && or || xor true true true true false true false false true true false true false true true false false false false false Test not ! true false false true Table 4.1: Truth table of various Perl logical operators
80. String manipulation operators manipulate on strings. Operator Description x String repetition operator . String concatenation operator