Python Tip #2 - Single Line if Statements Posted on 20-09-2018 | In PythonTips # Setting a value based on condition if condition: choice = "Head" else: choice = "Tail" # Single line Version choice = "Head" if condition else "Tail"