1 頁 (共 1 頁)

[Python]字串反排序

發表於 : 2018年 4月 9日, 14:36
tim
可以直接使用 extended slices

"abcdef"[::-1]

# return fedcba

參考資料:
https://docs.python.org/2/whatsnew/2.3. ... ded-slices