python中字符串的相鄰兩邊如何互換?
1. str轉(zhuǎn)list list = list(str) 2. list轉(zhuǎn)str str= ''.join(list) 3. tuple list相互轉(zhuǎn)換 tuple=tuple(list) list=list(tuple)
python中字符串的相鄰兩邊如何互換?
1. str轉(zhuǎn)list list = list(str) 2. list轉(zhuǎn)str str= ''.join(list) 3. tuple list相互轉(zhuǎn)換 tuple=tuple(list) list=list(tuple)