# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # Question 1:
# Make a regular expression to get all IP addresses from the below link and Extract the IP
# addresses.
# https://study-ccna.com/classes-of-ip-addresses/

# +
  
import requests, re
url = "https://study-ccna.com/classes-of-ip-addresses/"

r = requests.get(url)

data = r.text
ip = r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'

list1_ip = re.findall(ip, data)
list1_ip = list(set(list1_ip))
for each in list1_ip:
	print(each)
# -



StarcoderdataJupyterScriptsDedupFiltered