Odd badge ID

Write codeEasy10 minAmazon and Google style

Your task

An office turnstile logs a badge ID on every entry and every exit. At closing time, everyone has badged in and out, appearing an even number of times, except exactly one person who is still inside and appears an odd number of times. Given the day's log of badge IDs (non-negative integers, in any order), return the ID of the person still inside, using O(1) extra space. For example, [4, 7, 4] returns 7.

Examples

find_inside_badge(log: list[int]) -> int
Example 1
Inputfind_inside_badge([4, 7, 4])
Output7
Example 2
Inputfind_inside_badge([10, 20, 10, 30, 20])
Output30