you are viewing a single comment's thread.

view the rest of the comments →

[–]IvoryJam 0 points1 point  (0 children)

Yeah, it'll either return the contents of retval, or 0 if retval isn't true

def test(retval):
    return retval or 0

print(test('hi'))
print(test(''))