# Dragon Notes

UNDER CONSTRUCTION
Latest content:
 Apr 05 Deep Learning Mar 19 Anomaly Detection - ML Mar 13 +Data Tables Mar 08 Clustering - Machine Learning Feb 28 Support Vector Machines - ML Feb 20 Regression - Data Science

# Python:Command Comparisons

[List vs. Dictionary vs. Tuple vs. Set]

 list = [ ] dictionary = { : } tuple = ( ) set = { } - Mutable - Sliceable: list[start:end:step](ends at (end-1)) - Mutable - Not sliceable - Entries in {key:value} pairs, separated by commas - Unlike lists, a new key can be assi- gned a value, not just existing ones: s = {1:1, 2:4, 3:10} s[2] = 9 s[8] = 64 print(s) >>> {8:64, 1:1, 2:4, 3:9} - Immutable - Sliceable - Faster than lists and dictionaries due to occupying fixed slots in stack memory - Elements are mutable, e.g. lists: t = (1, ['x', 'y']) t[1][0] = 'z' print(t) >>> (1, ['z', 'y']) - Mutable - Unordered; can't be indexed - Cannot contain duplicate elements - Faster than lists for checking if an item is present - Instead of using append to add to a set, uses add