brewersfan1976

ch3-ex3.py

Jul 15th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. # a program that takes lists within a list and flattens the list
  2. # into one list
  3.  
  4. import operator
  5. list = [["a", "b", "c"], ["d", "e", "f"], ["g", "h", "i"]]
  6. list = reduce(operator.add, list)
  7.  
  8. print list
Advertisement
Add Comment
Please, Sign In to add comment