base1=[[2,3,5],[7,11,13],[17,19,23],[3,17,34]]
base2=[[3],[17]]
base3=[]
for j in base1:
a=0
for i in base2:
for k in j:
if i[0]==k:
a+=1
if a==1:
base3.append(j)
print(base3)