def is_matrix(iterable):
 if (is_iterable(iterable) and (len(iterable) > 0)):
  return all(imap((lambda x: (is_iterable(x) and (len(iterable[0]) == len(x)) and (len(x) > 0))), iterable))
 else:
  return False

def is_matrix ( iterable ) : if ( is_iterable ( iterable ) and ( len ( iterable ) > 0 ) ) : return all ( imap ( ( lambda x : ( is_iterable ( x ) and ( len ( iterable [ 0 ] ) == len ( x ) ) and ( len ( x ) > 0 ) ) ) , iterable ) ) else : return False
returns true if iterable is a two dimensional iterable where each iterable is not empty .