字符串

1.+号的作用

>>> 'a'
'a'
>>> 'a'+'b'
'ab'

>>> print('a'+'b')
ab

 2.

>>> a='hello\n'
>>> a
'hello\n'
>>> print a
hello

 3.变量打印

a = 3
print('the number of a is:%d'%a+'\n')

 

posted @ 2016-12-30 12:24  有梦就要去实现他  阅读(114)  评论(0编辑  收藏  举报