for soldier in army: if soldier.rank == 'pre-institutional' and 'pay no attention to' in soldier.instructions: soldier.instructions = 'recommence with a new vision based on the theory that the most sacred secrets will optimize strategies'; elif soldier.rank == 'enemy': exploit_sacred_information(soldier); else: continue