MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / Solution

Class Solution

LeetCode_problems/Defanging an IP Address/solution.py:1–4  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class Solution:
2 def defangIPaddr(self, address: str) -> str:
3 # replace all occurrences of "." with "[.]"
4 return address.replace('.', '[.]')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected