Split() & Join()

Example of how to use split :

ip_Addr = “10.10.10.1”
ip_Addr.split(“.”) <— will create a list [“10”, “10”, “10”, “1”]
octect = ip_Addr.spit(“.”)
octect[0]
10

Example of how to use join :

“.”.join(octect)
print(octect)
10.10.10.1

Leave a Comment