title: Identifying specific string and place it in the same index
body: <p>Related to my previous post, would it be possible to separate the list of weirdly combined animals and their attribute (denoted in #)?</p>
  
  <p>Dataset:</p>
  
  <pre><code>the_list = pd.Series([["dog", "cat", "#paws"],["gorilla"],["goat", "#beard","#hoofs"],["goldfish", "#fins", "#bigeyes", "#scales"]])
  </code></pre>
  
  <p>My Code:</p>
  
  <pre><code>category1 = []
  category2 = []
  
  for word_list in the_list:
      category1.append([{v : 1} for v in word_list if not "#" in v])
      category2.append([{v : 1} for v in word_list if "#" in v])
  </code></pre>
  
  <p>Here's the result:</p>
  
  <p>Category 1:</p>
  
  <pre><code>[{'dog': 1}, {'cat': 1}, {'gorilla': 1}, {'goat': 1}, {'goldfish': 1}]
  </code></pre>
  
  <p>Category 2:</p>
  
  <pre><code>[[{'#paws': 1}],
   [],
   [{'#beard': 1}, {'#hoofs': 1}],
   [{'#fins': 1}, {'#bigeyes': 1}, {'#scales': 1}]]
  </code></pre>
  
  <p>But what I need is to join all the elements of the same index instead of creating a separate dictionary for them</p>
  
  <p>Category1:</p>
  
  <pre><code>[{'dog': 1, 'cat': 1},
   {'gorilla': 1},
   {'goat': 1},
   {'goldfish': 1}]
  </code></pre>
  
  <p>Category2:</p>
  
  <pre><code>[{'#paws': 1}, # from dog, cat
   {'No Category 2': 1}, #from gorilla
   {"#beard" : 1,"#hoofs" : 1}, #from goat
   {'#fins': 1, '#bigeyes': 1, '#scales': 1}] #from goldfish
  </code></pre>