본문 바로가기
python-algorithm

Leetcode 1662. Check If Two String Arrays are Equivalent

by 무적김두칠 2021. 8. 17.

1
2
3
4
5
6
7
class Solution:
    def arrayStringsAreEqual(self, word1: List[str], word2: List[str]) -> bool:
        tmp1,tmp2="",""
        for i in word1: tmp1+=i
        for i in word2: tmp2+=i
        if tmp1==tmp2: return True
        elsereturn False
cs
반응형

댓글