4 ms·
Because that scans as: Variable x should be assigned if condition a true, otherwise b.
by secstate 10y ago
Because that scans as:
Variable x should be assigned if condition a true, otherwise b.
- oxryly1 10y agoBut "condition" is just a placeholder. A concrete example would be: msg = if (status == 0) "done" else "error"
- secstate 10y agoTake away the parens (which python is pretty explicit such structure should not be required to be legible). msg = if status == 0 "done" else "error" From a compiler perspective that's a bear to parse.