Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python ip address increment

# Import module
import ipaddress
 
# Arithmetic Operation on IPv4 address
print(ipaddress.IPv4Address(u'129.117.0.0')-6)
print (ipaddress.IPv4Address(u'175.199.42.211')+55)
print (ipaddress.IPv4Address(u'0.0.0.0')-1)
print (ipaddress.IPv4Address(u'255.255.255.255')+1)
 
# Arithmetic Operation on IPv6 address
print (ipaddress.IPv6Address(u'2001:0db8:85a3:2bfe:070d:8a2e:0370:7334')-330)
print (ipaddress.IPv6Address(u'2001:0db8:85a3:2bfe:070d:8a2e:0370:7334')+1000)
print (ipaddress.IPv6Address(u'0000::0000')-1)
print (ipaddress.IPv6Address(u'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff')+1)
Comment

PREVIOUS NEXT
Code Example
Python :: Failed to build wxPython 
Python :: import csv as dic 
Python :: unlimited arguments 
Python :: install requests-html in linux 
Python :: import in python 
Python :: simple keras model with one layer 
Python :: convert PIL RGB to opencv BRG 
Python :: alexa python get slot value 
Python :: selenium proxy with authentication 
Python :: sum the contents of a list python 
Python :: null=true django 
Python :: Python Add/Change List Elements 
Python :: set page title name and favicon in streamlit 
Python :: select inverse with conditions pandas 
Python :: create a thumbnail from video python 
Python :: zoom in librosa.display.specshow() 
Python :: maya python override color rgb 
Python :: get the creating date of files ftp python 
Python :: python float to int 
Python :: telegram bot documentation python 
Python :: save model with best validation loss keras 
Python :: string replace in python 
Python :: better way to see full csv in jupyter notebook 
Python :: stores number in set using input in python 
Python :: ord() python 
Python :: How to plot Feature importance of any model in python 
Python :: python % meaning 
Python :: python datetime make timezone aware 
Python :: sum() python 
Python :: save standard output in variable python 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =