BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Learning paths › Automation › Parsing show output and testing conditions

Parsing show output and testing conditions

Getting a value out of show output by splitting a line into fields, finding where a marker starts and handling the case where it is absent, then the conditions that test it — comparison, and, or and not, True and False as names, and what Python treats as empty — and the containers underneath: a list built and indexed, lists nested into a table of devices, sorting and reversing without losing the original, copying without aliasing, and a tuple for a record that must not change. Explanation and checks; four written exercises.

Lessons

More in Automation