#-*- coding: UTF-8 -*-
class Solution(object):
def findTheDifference(self, s, t):
s=sorted(list(s))
t=sorted(list(t))
for st in s:
p=t.index(st)
del t[p]
return ''.join(t)
sol=Solution()
print sol.findTheDifference('abddcde', 'eabadbdccdde')
相关文章
- 02-06LeetCode题解(1310):子数组异或查询(Python)
- 02-06❤leetcode,python2❤从排序数组中删除重复项
- 02-06❤leetcode,python2❤最大子序和
- 02-06LeetCode-239-剑指offer-滑动窗口的最大值-队列与栈-python
- 02-06[LeetCode][Python]Longest Palindromic Substring
- 02-06leetcode557. 反转字符串中的单词 III python,处理字符串的神!
- 02-06【LeetCode】297. Serialize and Deserialize Binary Tree 解题报告(Python)
- 02-06【LeetCode】109. Convert Sorted List to Binary Search Tree 解题报告(Python)
- 02-06LeetCode 287. 寻找重复数 Find the Duplicate Number (Medium)
- 02-06[Swift]LeetCode652. 寻找重复的子树 | Find Duplicate Subtrees