1
2
3
4
5
6
7
8
9
10
11
12
13
|
class Solution:
def findTheDifference(self, s: str, t: str) -> str:
ans=''
sList=[]
tList=[]
for i in s: sList.append(i)
for i in t: tList.append(i)
for i in sList:
tList.pop(tList.index(i))
for i in tList:
ans+=i
return ans
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 2129. Capitalize the Title (0) | 2022.03.25 |
---|---|
leetcode 217. Contains Duplicate (0) | 2022.03.24 |
leetcode 1394. Find Lucky Integer in an Array (0) | 2022.03.24 |
leetcode 1491. Average Salary Excluding the Minimum and Maximum Salary (0) | 2022.03.24 |
leetcode 1991. Find the Middle Index in Array (0) | 2022.03.24 |
댓글