>>> aport = '8912' >>> bpf_audio = 'dst port'.join(aport) >>> print bpf_audio 8dst port9dst port1dst port2 i want the output to be dst port 8912