How to transform string of space-separated key,value pairs of unique words into a dict

前端 未结 9 953
走了就别回头了
走了就别回头了 2020-11-30 14:22

I\'ve got a string with words that are separated by spaces (all words are unique, no duplicates). I turn this string into list:

s = \"#one cat #two dogs #th         


        
9条回答
  •  醉梦人生
    2020-11-30 14:32

    You're not being specific. Why are you trying to delete everything in the out-list? Any if all you need to do is clear the out-list, why not just do this:

    out = []
    

提交回复
热议问题