此代码段可用于查找字符串中的所有唯一字符。
string = "abcbcabdb" unique = set(string) new_string = ''.join(unique) print(new_string) # abcd
Copyright© 2013-2020
All Rights Reserved 京ICP备2023019179号-8