return the offset of argument
ex:
'test'.find('es')
---> 1
replace:
a='test'
a.replace('t' , 'b')
---> a is 'best'
split:
'aaa,bbb'.split(',')
--> [ 'aaa', 'bbb' ]
upper:
'test'.upper()
---> 'TEST'
isalpha(), isdigit()
rstripe()
remove whitespace on the right side
ord
ex:
ord('a')
--> 97
""":
ex:
a= """
b
""
c
"""
print a
---> b
""
c
format string:
ex:
n1=1
n2=2
print (" num1 %d num2 %d" %(n1, n2) )
沒有留言:
張貼留言