Page 22 - Python Cơ Bản
P. 22
numbers = [1, 2, 3, 4, 5]
names = ['Marry', 'Peter']
'ɹ XLВ XVY] \YϴX XкRK TL϶R Xм GжE QϲRK FЀRK MRHI\ TL϶R
Xм ч϶Y XMɱR Gɹ XLи Xр Pɧ 0 :ɴ Hд
print numbers[0]
(HiӅn thӍ 1)
print numbers[-3]
(HiӅn thӍ 3)
print names[1]
(HiӅn thӍ 'Peter')
ɇВ FMЎX чвG WР PвRK TL϶R Xм GжE 0MWX Gɹ XLВ Wм HдRK
LɧQ len(array) чВ Pϴ] WР PвRK TL϶R Xм GжE QϲRK XLEQ
WР XVY]АR ZɧS
/MВQ XVE Wр XТR XϰM GжE QШX TL϶R Xм
/MВQ XVE XLIS -RHI\