Python中字符串去重及排序的方法有以下几种:
s = "hello world"
s = ''.join(set(s))
print(s)
s = "hello world"
s = ''.join(sorted(s))
print(s)
s = "hello world"
s = ''.join(dict.fromkeys(s))
print(s)
s = "hello world"
s = ''.join(sorted(set(s)))
print(s)
以上是几种常见的Python字符串去重及排序的方法,根据实际需要选择合适的方法来解决问题。