
str_ = "1234"list1 = list(str_)print(list1)print(type(list1))# ['1', '2', '3', '4']# <class 'list'>
s = "a s d"str_list = s.split(sep=' ') # 按空格拆print(str_list)print(type(str_list))# ['a', 's', 'd']# <class 'list'>s = "a<s<d"str_list = s.split(sep='<') # 按<拆print(str_list)print(type(str_list))# ['a', 's', 'd']# <class 'list'>