<p>What's the best way to validate that an IP entered by the user is valid?  It comes in as a string.</p>

I think this would do it...
```
```
def validIP(address):
    parts = address.split(".")
    if len(parts) != 4:
        return False
    for item in parts:
        if not 0 <= int(item) <= 255:
            return False
    return True
```
```