There is something in the output that I am not aware of.
What this loop is doing is to split each line after the header and the '====...' by '|' separator, get the first element which is the mac address, split the ( six ) numbers and print each one formatted. It's quite simple. Does it print something before throwing the error? Where does it stop? What is on the line after that? As I see the error there is a wrong number of the elements of the mac address. So the print placeholders are six but in the 'mac' list could be any number. Put a
What this loop is doing is to split each line after the header and the '====...' by '|' separator, get the first element which is the mac address, split the ( six ) numbers and print each one formatted. It's quite simple. Does it print something before throwing the error? Where does it stop? What is on the line after that? As I see the error there is a wrong number of the elements of the mac address. So the print placeholders are six but in the 'mac' list could be any number. Put a
print(len(mac))
before the actual mac address printing to see what is happening.