In this program, we will take a string of IP address as input and remove zeros from an IP address.
Steps to solve the program
- Take a string of an IP address as input.
- Import re library.
- Remove zeros from the IP address using re.sub().
- Print the output.
Output :