본문 바로가기
python-algorithm

Leetcode 1678. Goal Parser Interpretation

by 무적김두칠 2021. 7. 16.

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
반응형

댓글