← Lesson
Docs Win (On Purpose)
Joeven
Run
Reset
Python loads on first run
def answer(doc, prior, docs_win): if docs_win and doc: return {"text": doc, "source": "doc"} return {"text": prior, "source": "prior"} DOC = "Refunds take 5-7 business days." PRIOR = "Refunds take 2 days." print(answer(DOC, PRIOR, True)) print(answer(DOC, PRIOR, False)) print(answer("", PRIOR, True))
Run to execute this in your browser. Nothing is sent to a server.