How do I check whether the IP address exist in URL by using Python? Is there any function that can be used to check the IP address? For example:data 1 & data 2 got the IP then will return 1, while data 3 will return 0
data =['http://95.154.196.187/broser/6716804bc5a91f707a34479012dad47c/',
'http://95.154.196.187/broser/',
'http://paypal.com.cgi-bin-websc5.b4d80a13c0a2116480.ee0r-cmd-login-submit-dispatch-']
def IP_exist(data):
for b in data:
containsdigit = any(a.isdigit() for a in b)
if containsdigit:
print("1")
else:
print("0")