def sameSynapse(syn, synapses):
 for s in synapses:
  if ((s[0] == syn[0]) and (s[1] == syn[1]) and (abs((s[2] - syn[2])) <= 0.001)):
   return True
 return False

def sameSynapse ( syn , synapses ) : for s in synapses : if ( ( s [ 0 ] == syn [ 0 ] ) and ( s [ 1 ] == syn [ 1 ] ) and ( abs ( ( s [ 2 ] - syn [ 2 ] ) ) <= 0.001 ) ) : return True return False
given a synapse and a list of synapses .