python-algorithm

Leetcode 1108. Defanging an IP Address

무적김두칠 2021. 7. 12. 13:17

 

1
2
3
4
class Solution:
    def defangIPaddr(self, address: str-> str:
        address=address.replace('.','[.]')
        return address
cs
반응형