Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 python 新手,试图反转字符串但不工作,为什么?
name='Sam Floyd' reverse = name[8:-1:-1]
使用那个更简单:)
name='Sam Floyd' reverse = name[::-1]