fork download
  1. # your code goes here
  2. import ipaddress
  3. a = u"1.0.3.31/31"
  4.  
  5. n = ipaddress.ip_network(a)
  6. print(n)
  7.  
Runtime error #stdin #stdout #stderr 0.02s 28048KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 5, in <module>
  File "/usr/lib/python3.5/ipaddress.py", line 74, in ip_network
    return IPv4Network(address, strict)
  File "/usr/lib/python3.5/ipaddress.py", line 1536, in __init__
    raise ValueError('%s has host bits set' % self)
ValueError: 1.0.3.31/31 has host bits set