02 Flow Control
if … else¶
conditional statement
branching
flowchart TB
db{1==0}
db --- |Yes|nesnt
db --- |No|blah
for
, if
and else
go to the immediate next block
Ternary Operator¶
cooler way of doing if else
Switch¶
switch(s):
{
case 1: something; break;
case 2: something; break;
default: something;
}
switch(s):
{
case 'a': something; break;
case 'b': something; break;
default: something;
}