Sometimes you are handed the hammer that is &&
and ||
,
and no proper if/else
.
1if x:
2 a
3else:
4 b
1(x && (a || true)) || b
1if x:
2 a
3else if y:
4 b
5else:
6 c
1(x && (a || true)) || (y && (b || true)) || c
1if x:
2 if y:
3 a
4 else:
5 b
6else:
7 b
1(x && (y && (a || true) || (b || true))) || c