i have a list of integers and i want to check which element is prime number and append that prime number in to another list. second 'for' loop does not work . how can i fix this issue?
a=[3,5,129,678,113,15,17]
b=[]
for i in a:
c=0
for a in (2,i//2):
if i%a==0:
c+=1
if c==0 :
b.append(i)