title: Adding duplicate keys to Python dictionary ("Two Sum" Problem)
body: <p>I've been trying to add duplicate keys to my python dictionary (table) in order to solve the "two Sum" problem.</p>
  
  <blockquote>
    <p>Given an array of integers, return indices of the two numbers such that they add up to a specific target.</p>
  </blockquote>
  
  <p>I've now realized this is impossible to do and would appreciate any ideas or suggestions on how to go about solving this problem without brute force. Please keep in mind i started trying to learn Python this week. So i apologize of theres a simple solution </p>
  
  <pre><code>numbers = [0, 0, 0, 0, 0, 0, 0]  # initial list
  target = 6  # The sum of two numbers within list
  
  # Make list into dictionary where the given values are used as keys and 
  actual values are indices
  table = {valueKey: index for index, valueKey in enumerate(numbers)}
  
  print(table)
  
  &gt;&gt;&gt; {0: 6}
  </code></pre>