字符串转列表函数 -- split
c = 'a|b|c|d'
print(c.split('|')) #['a', 'b', 'c', 'd']
print(c.split('|',1)) # ['a', 'b|c|d']
f = 'a~b~c'
print(f.split('~')) #['a', 'b', 'c']
列表/元组转字符串的函数 -- join
test = ['a','b','c']
new_str = '.'.join(test)
print(new_str)
test_tuple = ('abc','d','e')
new_tuple_str = '.'.join(test_tuple)
print(new_tuple_str)
sort_str = 'adfvcbeghij'
res = sorted(sort_str)
print("res=",res)
print(''.join(res))
print('|'.join(res))