Skip to content

python_study{py}:

Star_IMPL edited this page May 31, 2018 · 5 revisions

python2.7 编码 #-- coding: xxx -- #-- coding:UTF-8 --# -- coding:iso-8859-15 -- a=u"€" print ord(a)

路径的写法 print 'C:\a\b' 结果C:

print r'C:\a\b' 结果c:\a\b

print """aaa bbb""" 结果: aaa bbb

'aaa'+'bbb' 结果:'aaabbb'

'aa''bb' 'aabb'

num ='abcde' num[2] 'c' num[-1] 'e'

Clone this wiki locally