I'm currently learning some python and I was just wondering what is the best way to get a list of all the PID Id's of say Firefox and then displaying all the port numbers it is listening to. I am trying to replicate the image below and yet I can't seem to figure it out. Sorry in advance but I currently do not have any code atm as I've been testing and trying code that I have googled and found to no success.
