I have a variable I want to set depending on the values in three booleans. The most straight-forward way is an if statement followed by a series of elifs:
if a a
What about nested ifs - it means you don't have to check everything several times and reads clearer to me (although maybe not quite as clever as some of the other answers):
if a:
if b:
if c:
name="first"
else:
name="second"
else:
if c:
name="third"
else:
name="fourth"
else:
if b:
if c:
name="fifth"
else:
name="sixth"
else:
if c:
name="seventh"
else:
name="eighth"