Python – Main solver that gives compound numbers.

cousins ​​=[2]
a = 3
b = 0
while True
if a% cousins[b]== 0:
a + = 1
b + = 1
except IndexError:
primes.append (a)
print a
a + = 2
b = 1

I try to execute this code to give me a list of prime numbers, but it keeps spitting numbers like 16, 27, 95 and other larger composite numbers. The code is executed and there are no syntax errors that prevent it, but it will give me incorrect values ​​and I do not know why. Let me know if you find any errors or if it is a problem with Python3.