Capgemini interview question

How to validate if a given address is a valid IP Address using python