python-algorithm

Leetcode 1678. Goal Parser Interpretation

무적김두칠 2021. 7. 16. 09:46

1
2
3
4
5
6
class Solution:
    def interpret(self, command: str-> str:
        command=command.replace("()","o")
        command=command.replace("(","")
        command=command.replace(")","")
        return command
cs
반응형