変数名に list 使うな

func(l):
if l[0] != a && l[1] != b: return
f = (conv_a, conv_b)[l[0] != a]
for i in l:
f(i)
write(i)