Recently I came across this code snippet in python:
a = 'holy'
b = 'grail'
c = None
d = a or b or c
print(d) #prints holy
I thought that it would print True. Because bool(a) = True, bool(b) = True, and bool(c) = False, I thought this would simplify to (True or True) or False which is True. Yet, d is simply assigned to a. Do I have a fundamental misunderstanding of how python is working?
Can somebody explain exactly what's going on? Are the or's just superfluous?