title: Python 3 - Dictionary.items str object has no attribute items error
body: <p>I am new to Python and I wanted to input a dictionary through command line and have below code print the key:</p>
  
  <pre><code>for line in sys.stdin:
  
      adict ={}
      line = line.strip()
      adict = line
  
      for key, value in adict.items():
          print(key)
  </code></pre>
  
  <p>I keep getting the error: AttributeError: 'str' object has no attribute 'items'.</p>
  
  <p>When I try to create a dictionary and print it, it does:</p>
  
  <pre><code>data = {}
  data[str(0) + str(1)] = "A " +  str(0) + " " + str(1.0) 
  
  for key, value in data.items():
      print(key)
  </code></pre>
  
  <p>Why am I not able to enter a dictionary from the command line and have the key printed? I am taking the dictionary input ({'01': 'A 0 1.0'}) and storing it in a dictionary variable, adict. adict prints correctly but why can't I use items() on it? Am I doing something incorrectly?  </p>