title: ValueError: dictionary update sequence element #0 has length 3; 2 is required
body: <p>I am trying to insert values in MongoDB, but I am getting this error:</p>
  
  <blockquote>
    <p>ValueError: dictionary update sequence element #0 has length 3; 2 is required.</p>
  </blockquote>
  
  <pre><code>From pymongo import MongoClient
  
  client = MongoClient()
  
  db = client.abc_database
  
  keys = []
  values = []
  key = input("enter keys:").split(",")
  keys.append(key)
  print(keys)
  print(keys[0][1])
  value = input("enter values").split(",")
  values.append(value)
  print(values)
  fin = []
  k = 0
  while k &lt; len(keys[0]):
      d = keys[0][k] + ":" + values[0][k]
      fin.append(d)
      k += 1
  print(fin)
  fin_id = db.fin.insert(dict([fin]))
  print("successful")
  </code></pre>