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 |
반응형
'python-algorithm' 카테고리의 다른 글
Leetcode 1221. Split a String in Balanced Strings (0) | 2021.07.16 |
---|---|
Leetcode 1773. Count Items Matching a Rule (0) | 2021.07.16 |
Leetcode 1389. Create Target Array in the Given Order (0) | 2021.07.16 |
Leetcode 1342. Number of Steps to Reduce a Number to Zero (0) | 2021.07.15 |
Leetcode 1281. Subtract the Product and Sum of Digits of an Integer (0) | 2021.07.15 |
댓글