Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. a1, a2, a3, a4 = eval(input("Enter the four components of an IP address, seperated by commas: "))
  2. print(a1, a2, a3, a4)
  3.  
  4. def is_valid_ip (a1, a2, a3, a4):
  5.     if a1 >= 1 and a1 <= 255 and a2 >= 0 and a2 <= 255 and a3 >= 0 and a3 <= 255 and a4 >= 0 and a4 <= 255:
  6.         print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement