extract from a text file and convert it to dictionary

Viewed 20

I have a text file like the one uploaded and I want to extract information from it and convert it to a dictionary in Python like the example uploaded above.

But I was to extract information only if the the Status is up so the key should be the IP address and the value are the ports numbers. I tried many codes but none of them unfortunately worked. The code should be in Python. Thank you.

enter image description here enter image description here

0 Answers
Related