>>>st="Python"
>>>st[0]
|
>>> st[-1]
|
>>> st[1:3]
|
>>> st[:3]
|
>>> st[:]
|
>>> st[1:3:2]
|
>>>lst=['HUAWEI','OPPO','VIVO','XIAOMI']
>>>lst[0]
|
>>> lst[-1]
|
>>> lst[1:3]
|
>>> lst[:3]
|
>>> lst[:]
|
>>> lst[1:3:2]
|
>>>n="Java" >>>len(n)
|