def nathanathan(function, yays=[], nays=[]):
 yay_set = set()
 nay_set = set()
 for yay in yays:
  if (yay in yay_set):
   print (yay + ' tried to vote more than once.')
  else:
   yay_set.add(yay)
 for nay in nays:
  if (nay in nay_set):
   print (nay + ' tried to vote more than once.')
  else:
   nay_set.add(nay)
 for yay_nay_vote in yay_set.intersection(nay_set):
  print (yay_nay_vote + ' voted yay and nay.')
 valid_names = nathanathan.__globals__.keys()
 for vote in yay_set.union(nay_set):
  if (vote not in valid_names):
   print (vote + ' is not a valid voter')
   if (vote in yay_set):
    yay_set.remove(vote)
   if (vote in nay_set):
    nay_set.remove(vote)
 if (len(yay_set) >= len(nay_set)):
  function()

def nathanathan ( function , yays = [ ] , nays = [ ] ) : yay_set = set ( ) nay_set = set ( ) for yay in yays : if ( yay in yay_set ) : print ( yay + ' tried to vote more than once.' ) else : yay_set . add ( yay ) for nay in nays : if ( nay in nay_set ) : print ( nay + ' tried to vote more than once.' ) else : nay_set . add ( nay ) for yay_nay_vote in yay_set . intersection ( nay_set ) : print ( yay_nay_vote + ' voted yay and nay.' ) valid_names = nathanathan . __globals__ . keys ( ) for vote in yay_set . union ( nay_set ) : if ( vote not in valid_names ) : print ( vote + ' is not a valid voter' ) if ( vote in yay_set ) : yay_set . remove ( vote ) if ( vote in nay_set ) : nay_set . remove ( vote ) if ( len ( yay_set ) >= len ( nay_set ) ) : function ( )
this is a function for voting on whether functions should run .