python中字符串拼接

a1=3
b1=4
c1=a1+b1
print(c1)

a2=str(a1)
b2=str(b1)
c2=a2+b2
print(c2)

a3='a'
b3='b'
c3=a3+b3
print(c3)

可以看到变量的类型

 

 运行结果

 

posted @ 2020-06-07 17:30  青女素娥  阅读(154)  评论(0编辑  收藏  举报