''' Created on May 18, 2016 @author: Brett Paufler Copyright Brett Paufler ''' func = [lambda x: x + 0, lambda x: x + 1, lambda x: x + 2, ] result = [f(x) for x in [0, 10, 100] for f in func] print result #[0, 1, 2, 10, 11, 12, 100, 101, 102] temp = 0 print temp def one(): print temp one() def two(): temp = 2 print temp two() print temp def three(): one() two() print temp print three()