Phenom Interview Question

Write a python script to extract IP's from given data and conditions.