@@ -0,0 +1,850 @@
+#!/usr/bin/env python3%0A# imports go here%0A%0A#%0A# Free Coding session for 2015-03-13%0A# Written by Matt Warren%0A#%0A%0A%0Aclass Example(object):%0A    def name(self):%0A        return 'name'%0A    print(type(name))%0A%0Aprint(type(Example.name))  # this is different in python 2/3%0A%0Ameasures = %5B%5B1, 2, 3, 4%5D, %5B1, 2, 3, 4%5D, %5B1, 2, 3, 4%5D, %5B1, 2, 3, 4%5D%5D%0A%0A# bad examples:%0A# print(%5Bbeat for beat in measure for measure in measures%5D)%0Aprint(%5Bbeat for beat in %5Bmeasure for measure in measures%5D%5D)%0Aprint(%5B%5Bbeat for beat in measure%5D for measure in measures%5D)%0Aprint(%5Bbeat for measure in measures for beat in measure%5D)%0A# print(%5B%5Bbeat for measure in measures%5D for beat in measure%5D)%0A# print(%5Bbeat for measure in %5Bmeasures for beat in measure%5D%5D)%0Aprint(%5Bmeasure for measure in measures%5D)%0A%0A# much easier to understand:%0Aflat = %5B%5D%0Afor measure in measures:%0A    flat.extend(measure)%0Aprint(flat)%0A

nested list comprehensions: not a good idea