_:n9a2b20aff6dd4a6bb0dea39861c7a860xb2
<http://schema.org/text>
"Great question! The line pres = pres or set() is a bit of an idiom.\nFirst, notice that the default value for pres is None. Since the code is intended to be called recursively, the top_level call would not have any initial value to pass, so the argument is not specified. \nWhen entering the function for the first time, since pres is not specified it is set to None. Now to the line in question.\nIn Python, an or will evaluate \"lazily\". That is, it will stop evaluating and return the first \"truthy\" object. If pres is specified, then it will be assigned to the local variable pres. [assignment within a function makes the variable local.] If pres is not specified, then it becomes None, The statement then reads None or set() which the or passes over the None and evaluates set() returning the new empty set.\nOn subsequent calls to prereqs where pres is specified, the set() portion is not evaluated.\nPost back if you have more questions. Good Luck!!"
<https://teamtreehouse.com/community/prerequisite-challenge-pres-pres-or-set>