1. 程式人生 > >字元陣列輸出

字元陣列輸出

Astring = 'hello world'
Astring = [0]
Astring = [1:5]
Astring = [6:]

改變字串

Astring = Astring[:6] + 'python'

刪除字元和字串

Astring = 'hello world'
Astring = Astring[:3] + Astring[4:]
Astring
Astring = ' '
Astring
del Astring