def _flatten_code(code):
 flat_code = []
 for c in code:
  flat_code.extend(c)
 return flat_code

def _flatten_code ( code ) : flat_code = [ ] for c in code : flat_code . extend ( c ) return flat_code
flattens the code from a list of tuples .