Python - checking for an ip address (and nothing after it) : <p>I'm trying to create a Python (2.7) function that will take a string and return true if its input is an ip address, possibly with a slash in the end, but false otherwise. 
It needs to return a false value if the string is not just an ip address, but an ip address followed by some sort of path.
It doesn't matter if the address is a valid IP or not (999.999.999.999 can be considered an ip address for that matter).</p>

<p>eg:
"124.131.141.248" - true
"124.131.141.248/" - true
"124.131.141.248/bla" - false
"hello world" - false</p>

<p>I've tried searching for a solution but most solutions include just checking for a valid IP address, disregarding my other needs.</p>

<p>Any help would be appreciated.</p>

<p>Thanks,</p>
