Quick and Painless Tutorial (cont) # deleting something from a list, or deleting a variable del var # var = 1 is now an error! a = [1,2,3]; del a[-1] # a == [1,2] # tuples (collection of values) are immutable (1,2) (1,) t = ('a', 1, 0L) x,y,z = t # dictionaries (aka associative arrays) d = {1: 9000, 'aa': 9001} d[1] = 7 del d['aa'] d.keys() d.has_key(7) # more conditionals lst = ['a', 'c', 'd'] # ('a' in lst) == 1, ('b' not in lst) == 0 lst2 = lst[0:len(lst)] # (lst is not lst2) == 1