str
=
'Hello world'
print str[
0
:
4
]
(HiӅn thӍ
"Hell"
)
print str[:
4
]
(HiӅn thӍ
"Hell"
)
print str[
-
3
:]
(HiӅn thӍ
"rld"
)
print str[
6
:
-
3
]
(HiӅn thӍ
"wo"
)
0ϴ]чШHɧMGжEGLYЦM
7мHдRKLɧQ
len(...)
чВXVϲZАчШHɧMGжEGLYЦM:ɴHд
count
=
len(
"Hello world"
)
(count có giá trӍ
11
)
8ɳQ XLE]XLЎRШMHYRK
'ɹXLВXɳQZɧXLE]XLЎXVSRKGLYЦMFЀRKGɨGLKМMTLRK