string1 = "abcde" 通過list(str), 使字符串變?yōu)榱斜恚?/p> 通過list.reverse(), 使列表反轉(zhuǎn); 通過"".join(list), 使列表變?yōu)樽址?/p> /usr/local/bin/python3.7 /Users/zhouxl/Documents/python小甲魚視頻/小甲魚py/change.py ['e', 'd', 'c', 'b', 'a'] edcba Process finished with exit code 0 |
|