import sys def isAlly(ally): if ally == 'imperial': return 1 return 0 def isEnemy(enemy): if enemy == 'rebel': return 1 return 0