def a_to_s(A):
 strs = []
 for row in A:
  x = ([None] * len(row))
  for (i, num) in enumerate(row):
   if (num != 0):
    x[i] = '@'
   else:
    x[i] = ' '
  strs.append(''.join(x))
 return '\n'.join(strs)

def a_to_s ( A ) : strs = [ ] for row in A : x = ( [ None ] * len ( row ) ) for ( i , num ) in enumerate ( row ) : if ( num != 0 ) : x [ i ] = '@' else : x [ i ] = ' ' strs . append ( '' . join ( x ) ) return '\n' . join ( strs )
prints binary array .