python语法_字符串拼接

+号可以用来做字符串拼接

print("abc"+"efg"+"def")

abcefgdef 

字符串(str)与数字(int)不能使用+进行拼接

posted @ 2018-11-08 09:59  小水胖  阅读(227)  评论(0编辑  收藏  举报