If / Else

An if statement can take a value of bool, ├Čnt or bytes. An int value is interpreted to be false if and only if it equals 0. A bytes value is interpreted as false if and only if every byte of its value equals b'00'. That includes empty bytes (b'').

// Can be either:
bool cond = true;
// or:
bytes cond = b'01';
// or:
int cond = 1;

if (cond) {
    ...
} else {
    ...
}