python非字符串与字符产链连接

 

第一种办法:

"hello" +' '+str(110)

  

输出结果:

'hello 110'

 

 第二种办法:

import numpy
x = 110
print 'hello(%d)'%(x)

  

输出结果:

'hello 110'

 

posted @ 2016-06-14 18:38  视觉书虫  阅读(218)  评论(0编辑  收藏  举报