TLE error in O(n) solution


#1

class Solution:
# @param A : tuple of integers
# @return an integer
def singleNumber(self, A):
r = 0
count = [0]*32
while r < len(A):
x = [int(a) for a in (’{:032b}’.format(A[r]))]
count = [sum(x1) for x1 in zip(x,count)]
r = r + 1
r = 0
while r < len(count):
count[r] = count[r]%2
r = r + 1
return(int(’’.join(str(char) for char in count), 2))

why this is giving TLE