The principal built-in types are numerics, sequences, mappings, classes, instances and exceptions. The following is a list of some keynotes on Python.
-
Interger: unlimited precision. e.g. 1, 2, 3
-
Floating: double in C, e.g. 1.0, 2.0, 3.0
-
Boolean: True or False
-
Logic operations in precedence: not, and, or.
-
String: single quote, 'a'; double quote, "a"; triple single-quote, '''a'''; triple double-quote, """a"""; str()
-
Concatenation operation: 'a' + 'b'
-
NoneType: None
-
None, 0, 0.0, "", [] will be evaluated to False.
-
List: []
-
Tuple: ()
-
Set: {}
-
Dictionary: {key:value}
-
List and Set comprehension: [ expression context ]
-
Control flow: if-elif-else; expr if cond else expr; for x in iterable; while cond: statements; break; continue.
-
function and lambda: def func_name(argument_comma_seperated_list): statements; lambda argument_comma_seperated_list: <return_expression>.
-
Sequence Slicing. [start : stop : step]