← pynet

exercise_1.py

218a08ac4e53467a8b15733ac440dbec01479f99 · ovidiucs · Sep 9, 2015 11:49

+9 −2 · 1 file changed

  • exercise_1.py +9 −2
diff --git a/exercise_1.py b/exercise_1.py
index 548fc2b..2a67843 100644
--- a/exercise_1.py
+++ b/exercise_1.py
@@ -1,7 +1,14 @@
-/*
+'''
 1. Use the split method to divide the following IPv6 address into groups of 4
 hex digits (i.e. split on the ":")
 
 FE80:0000:0000:0000:0101:A3EF:EE1E:1719
-*/
+'''
 
+ipv6_address = 'FE80:0000:0000:0000:0101:A3EF:EE1E:1719'
+ipv6_address_section = ipv6_address.split(":")
+
+print \n 'IPv6 sections below' \n
+print ipv6_address_section \n
+
+print "joined" + ":".join(ipv6_address_section) \n