diff options
Diffstat (limited to 'challenge-272/zapwai/python/ch-1.py')
| -rw-r--r-- | challenge-272/zapwai/python/ch-1.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/challenge-272/zapwai/python/ch-1.py b/challenge-272/zapwai/python/ch-1.py new file mode 100644 index 0000000000..d254cbd0ac --- /dev/null +++ b/challenge-272/zapwai/python/ch-1.py @@ -0,0 +1,15 @@ +def proc(ip): + nums = ip.split('.') + out = '' + for i in range(len(nums)): + str = nums[i] + if i < len(nums) - 1: + str += "[.]" + out += str + print("Input:", ip) + print("Output:", out) + +ip = "1.1.1.1" +proc(ip) +ip = "255.101.1.0" +proc(ip) |
