python环境下udp协议怎么发送换行符

ra='%s' % local_name+'\n'+'%s' % local_ip+'\n'+'%s' % current_time+'\n'+'%s' % msgID

print ra
s.sendto(ra,(host,port))

这是代码

('Received:', 'ubuntu\n127.0.1.1\n2015-12-15 23:59:03\n20151215235903')

这是结果...

同样的方式TCP挺好....

\n就是换行符,要看你接收端是否正确处理