Page 1 :
for lists, tuples, strings, bytes., Sequence Containers Indexing, -5, -4, -3, -2, -1, Items count, Individual access to items via 1st [index), 1st [0]-10 - first one, 1st [-11-50 = last one, negative inder, len (1st)+5, I index from 0, 1st [1]-20, 1st (-21+40, positive inder, 2, 3, 4, 1st=[10, 20, 30; 40, 50], positive slice, -5, neguative slice, 3, On mutable sequences (list), remove with, del 1st (3] and modify with assignment, 1st [4]=25, (here from 0 to 4), -4, -2, -1, Access to sub-sequences via 1st [start slice: end stice: step], 1st [:-11-[10, 20, 30, 40] 1st [::-1]-[50, 40, 30, 20, 10] 1st [1:3]-[20, 30], 1st (1:-11-[20, 30, 401, 1st [::2]-[10, 30, 501, 1st [:31-[10,20, 30], 1st [-3:-1]-[30, 40] 1st [3:1+[40, 50], 1st [::-21-[50, 30, 101, 1st [:]-[10, 20, 30, 40, 50] shallow copy of sequence, Missing slice indicatiom - from start / up 1o end., On mutable sequences (list), remove with del 1st [3:5] and modify with assignment 1st (1:4] = [15, 25], Boolean Logic, Statements Blocks mondule trucsofile truc.py, Modules/Names Imports, Comparisons : < > <= >=, (boolean results), parent statement:, statement block 1..., from monmod import noml, nom2 as fct, -direct uccess o names, renaming with as, import monmod --access via monmod. noml., I modules and packages searched in python path (cf sys.path), statement block executed only, if a condition is true, if logical condition:, statements block, a and b logical and oth simulta-, -necusly, a or b logical or one or other, parent statement:, statement block2.., Conditional Statement, or both, pitfall : and and or return yalue of a or, of b (under shorteut evaluation)., = ensure that a and b ure booleans., yes, no, yes, next statement after block 1, not a logical not, True 1, E True and False constants, 1 configure editor to insert 4 spuces in, place of an indentation tab., Cun go with several elif, elif. and only one, final else. Only the block of first tnue, condition is executed., if agec18:, state"Kid", elif age>65:, state"Retired", else:, states"Active", False, floating numbers. approximated values, angles in radians, Maths witlh a var x, Operators: + - / //**, if bool (x) True: e if x:, if bool (x) Ealse: e if not x:, from math import sin, pi., sin (pi/4) -0.707., cos (2*pi/3) -0.4999., sqrt (81) -9.0, log (e**2) -2.0, ceil (12.5) -13, floor (12.5) +12, modules math, statistics, random,, decimal, fractions, numpy. e. (ef. doc), Priority (...), integer + - remainder, Signaling an error:, raise ErClassf.), Errors processing:, try:, normal procesising block, except Ercepticn as e:, eror processing block, Exceptions on Errors, @+ matrix x psthul34nunpy, (1+5.3) *2-12.6, abs (-3.2)-3.2, round (3.57, 1) -3.6, pow (4,3) -64.0, fusual erder of operations, ermar, nurmal, er alse, processing, pwIEssing, I finally block for final prucesing, in all c, indentation!