Control flow

Introduction

Introduction

generators as type of iterable

+ list(range()) to get actual enumerated

+ match/case in python

Enumerate Range

and or in python

+ iterate over list in python: enumerate + iterate over dict in python: for in dict.items() + iterate over copy to prevent problems in changing stuff. for x in dict.copy().items() + for i in range(5) + for i in range(0, 5, 1)

python: + question mark notation if else

logical functions in base: + any(); all()

enumerate

for count, value in enumerate(list_name):

zip

start with 2 (or more) lists or other things

want to pair them

for x in zip(a, b):

iterates over 1st of both, 2nd of both etc