| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 495 人关注过本帖
标题:typeError: can't concatenation 'str' and 'int' objects
取消只看楼主 加入收藏
tony_wang
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2010-11-26
结帖率:0
收藏
已结贴  问题点数:0 回复次数:1 
typeError: can't concatenation 'str' and 'int' objects
a = 12
print 'a = '+int(a)
typeError: can't concatenation 'str' and 'int' objects

我是开始接触python的新手,
请有经验的前辈解释一下为什么不能用int(a),而必须用str(a)?
搜索更多相关主题的帖子: objects 
2011-08-25 13:27
tony_wang
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2010-11-26
收藏
得分:0 
多谢!
2011-09-07 17:11
快速回复:typeError: can't concatenation 'str' and 'int' objects
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025502 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved