Odd badge ID
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]) -> intExample 1
Input
find_inside_badge([4, 7, 4])Output
7Example 2
Input
find_inside_badge([10, 20, 10, 30, 20])Output
30