title: Python: Splitting a long string by character for input into dictionary
body: <p>I am importing a file into a dictionary. The file is organized with lines like this:</p>
  
  <pre><code>Category One?Category Two?Category Three?Category 4?Category 5
  </code></pre>
  
  <p>I'm splitting each line into its individual categories with the intention that the information contained in Category One and Category Two need to be combined into a single category to eventually be the key, whereas the rest of the categories contain information that's later going to be values.</p>
  
  <p>I haven't worked with this many categories before (I've done Cat1 = key and Cat2 = value) so I'm a little confused about how to apply what I know. </p>
  
  <p>Assuming I'd already collected and opened the source file, if I had only two categories, I would do:</p>
  
  <pre><code>dict1 = {}
  for line in file:
      k,v = line.split('?')
      dict1[k.strip()] = v.strip()
  </code></pre>
  
  <p>I'm not sure how to combine the data in the Category One and Category Two spots into functionally one category, nor how to collect categories 3-5 into separate values. Right now I'm just focusing on splitting them into Category One = key and Categories Everything Else = values. It doesn't seem that changing line 3 to k,v,v,v,v really works, more's the pity; this produces</p>
  
  <pre><code>{'Category One': 'Category Five')
  </code></pre>
  
  <p>Am I missing something obvious? <strong>Edit</strong> Yes I sure was- and boy, do I need another cup of coffee this morning. Of course if I call everything v it will just give me the last thing I called v...</p>
  
  <p>(Obviously my source file looks different from this, but the basic organization is the same.)</p>