1.字符轉ascii數字
ord (字符) = ascii表裏的位置
chr (ascii表裏的位置) = 字符
2.迭代中獲取list/str下標
for i,ch in enumerate(str/list):
i 下標
ch 字符
3.獲取字符串中某個字符的下標
在S字符串裏面在[start,end)的區間裏查找substr的下標
S.index(substr,start ,end) -> idx(下標)
S.rindex(substr,start ,end) ->idx(下標--右邊開始的一個substr)
# Like S.find() but raise ValueError when the substring is not found.