yl = [10, 38, 66, 94, 122, 150, 178, 206, 234, 262, 290, 318, 346]
x = sorted(bl + yl)
out = ', '.join([('blue' if y in bl else 'yellow') for y in x])
print(out)
Python, arranging sequences in 2 combined arrays