[Tutor] Validating String contains IP address

Alan Gauld alan.gauld at yahoo.co.uk
Mon Apr 3 19:35:00 EDT 2017


On 03/04/17 19:43, Ed Manning wrote:

> untrust_ip_address = raw_input('\nEnter the  untrust IP ''"Example 172.20.2.3/28"'':')
> while not ipaddress.ip_network untrust_ip_address:

Doesn't that give a syntax error?

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list