-
Anaconda Individual for Windows
-
Anaconda prompt
- install package:
conda install numpy
Installed with the Anaconda Navigator
- Spyder
- Jupyter Notebooks
- Enter Command mode: ESC
- Enter Edit mode: ENTER
- insert cell below: b
- insert cell above: a
- delete cell: dd
- convert cell to MarkDown: m
- convert cell to code: y
- Cell to heading 1-6: 1-6
- Cell to raw: r
- Cut cell: x
- Copy cell: c
- Paste cells below: v
- Paste cells above: SHIFT+v
- SHIFT+ENTER: Run cell and select next
- CTRL+ENTER: Run selected cells
- ALT+ENTER: Run cell and insert below
- SHIFT+TAB: Show declaration
- SHIFT+TAB+TAB: Show full description
Let's try to understand the Python data types.
- integer
- float
- del()
- list.remove()
- list.pop()
- list.append()
- sorted() vs. list.sort() (sort() changes the original)
- [k:v, ...]
- ()
- {}
- if, else, elif
- for
- while
- nested loops
- def name(positional_params, keyword_params[=with_default_value])
l1 = [ x*y for x in range(0,11) for y in range(0,11)]
l2 = [ x*y for x in range(0,11) for y in range(0,11) if (x*y)%2 == 0]
l1 = [1,2,3,4,5,6,7]
filtered = list(filter(lambda x: x%2==0, l1))
print(filtered)
See: filter_map_spec_functions.jpynb
Used libraries:
- functools for reduce
- operator for reduce with addition
- itertools for accumulation