On this page
article
Parse IP Address
Validate and inspect IP addresses.
Category: ipaddress
Problem
Validate and inspect IP addresses.
Solution
ip = ipaddress.ip_address('192.168.1.1')
Notes
- Adapt variable names and paths to your project
- Add error handling for production use
- See related chapters in the Learning Path