Python simple solution with easy explanation
Intuition\n\npref = \begin{matrix}[a_1 & a_2 & a_3 & a_4 & a_5]\end{matrix} \n\nLet  \space result = \begin{matrix}[r_1 & r_2 & r_3 & r_4 & r_5]\end{matrix}.\n\
# Intuition\n$$\npref = \\begin{matrix}[a_1 & a_2 & a_3 & a_4 & a_5]\\end{matrix} \n$$\nLet $$ \\space result = \\begin{matrix}[r_1 & r_2 & r_3 & r_4 & r_5]\\end{matrix}.\n$$\n\nFYI) $$  \\oplus$$ is XOR symbol\n\n$$\na_1 = r_1 \\space \\oplus \\space 0\n\\newline\na_2 = r_1 \\space \\oplus \\space r_2 \n\\newline\na_3 = r_1 \\space \\oplus \\space r_2 \\space \\oplus \\space r_3\n\\newline\na_4 = r_1 \\space \\oplus \\space r_2 \\space \\oplus \\space r_3 \\space \\oplus \\space r_4\n\\newline\na_5 = r_1 \\space \\oplus \\space r_2 \\space \\oplus \\space r_3 \\space \\oplus \\space r_4 \\space \\oplus \\space r_5\n\\newline\n$$\ncan be rewriteen as\n$$\na_1 = r_1 \\space \\oplus \\space 0\n\\newline\na_2 = a_1 \\space \\oplus \\space r_2 \n\\newline\na_3 = a_2 \\space \\oplus \\space r_3\n\\newline\na_4 = a_3 \\space \\oplus \\space r_4\n\\newline\na_5 = a_4 \\space \\oplus \\space r_5\n\\newline\n$$\n\nWhen $$ a \\space \\oplus \\space b = c$$, also $$ c \\space \\oplus \\space a = b$$ is true.\nThus,\n\n$$\nr_1 = a_1 \\oplus 0\n\\newline\nr_2 = a_1 \\space \\oplus \\space a_2 \n\\newline\nr_3 = a_2 \\space \\oplus \\space a_3\n\\newline\nr_4 = a_3 \\space \\oplus \\space a_4\n\\newline\nr_5 = a_4 \\space \\oplus \\space a_5\n\\newline\n$$\n\n![KakaoTalk_20231031_123933261.jpg](https://assets.leetcode.com/users/images/fd635588-31b0-44bd-86bc-38d991de2f61_1698723684.4343996.jpeg)\n\n\n\n# Code\n```\nclass Solution:\n    def findArray(self, pref: List[int]) -> List[int]:\n        pref.insert(0,0)\n        return [pref[idx]^pref[idx+1] for idx in range(len(pref)-1)]\n```
['Python3']