title: How to extract the ip address and physical address a arp table for each device on a network in Python
body: <p>I wrote this piece of code that displays the arp table on a network and it displays the information on multiple lines for each device on the network. I wanted to know if there was a way I can extract the <strong>IP Address</strong> and <strong>Physical Address</strong> for each device and as they are the only parts I need. Here are the codes I used to get the ARP table:</p>
  <pre><code>for device in os.popen('arp -a'):
      print(device)
  </code></pre>
  <p>I am fairly new to Python so I need help on how to get that information from the table we get when these codes are run.</p>