You are given two strings
t is generated by random shuffling string
s and then add one more letter at a random position.
Return the letter that was added to
Input: s = "abcd", t = "abcde" Output: "e" Explanation: 'e' is the letter that was added.
Input: s = "", t = "y" Output: "y"
0 <= s.length <= 1000
t.length == s.length + 1
tconsist of lowercase English letters.
class Solution: def findTheDifference(self, s: str, t: str) -> str: x=0 for i in s+t: x^=ord(i) return chr(x)