BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Learning paths › Automation › Readable code, branching and loops

Readable code, branching and loops

Branching and looping as a script grows: if and elif deciding from what the device reported, while with break, continue and a loop else, iteration without managing an index, a dictionary walked as keys, values or items, and ranges counted up or down — then values looked up by a name that means something, dictionaries merged and emptied, and finally working code wrapped in a function, with a Netmiko login turned into one reusable call whose arguments are named. Explanation and checks; seven written exercises.

Lessons

More in Automation