if else in one line

PHOTO EMBED

Thu Mar 04 2021 14:16:08 GMT+0000 (Coordinated Universal Time)

Saved by @geraldbaeck #python

def func(x):
    return "something" if x == 0 else "something else"
content_copyCOPY