algorithms/find_odd_int/find_odd_int.py

8 lines
179 B
Python
Raw Normal View History

2024-01-12 09:36:47 -05:00
def findOdd(numbers: list[int]) -> int:
for number in numbers:
if numbers.count(number) % 2 != 0:
return number
return 69
print(findOdd([1,1,2,3,2]))