成員關(guān)系操作符(in疤孕、not in)
Example
對象[not] in 序列
letter = "ABCDEFG"
'A' in letter
鏈接操作符(+)
Example
序列+序列
abc = 'abc'
bcd = 'bcd'
abc + bcd
重復操作符(*)
序列*整數(shù)
Example
string = '重要的事要說三遍'
string * 3
切片操作符([:])
序列[0:整數(shù)]
Example
string = 'ababbcbc'
sting[0:3]