Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ipAddress = "123.456.789.000"
- octets = ipAddress.split('.')
- validOctetsCount = 0;
- for octet in octets:
- if octet.isdigit():
- validOctetsCount += 1
- else:
- continue
- if validOctetsCount != 4:
- print("Please try again!")
- else:
- print("Success!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement