SHARE
TWEET

Untitled

a guest Aug 20th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ipAddress = "123.456.789.000"
  2.  
  3. octets = ipAddress.split('.')
  4.  
  5. validOctetsCount = 0;
  6.  
  7. for octet in octets:
  8.     if octet.isdigit():
  9.         validOctetsCount += 1
  10.     else:
  11.         continue
  12.    
  13. if validOctetsCount != 4:
  14.     print("Please try again!")
  15. else:
  16.     print("Success!")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top