title: Python Dictionaries with lists from user input how to solve this?
body: <p>Write a program that ask the user to enter an integer representing the number of items to be added to the stock. For these items, the program should then ask for the item barcode number and name, add them to a dictionary and print them.</p>
  
  <p>Why is my code not working as expected?</p>
  
  <pre><code>size=input("Enter size of list")
  names=[input()]
  code=[int(input())]
  for i in size:
      print("Enter name and code")
      names.append(input())
      code.append(int(input()))
      dict={names[i]:code[i]}
  
  print(dict)
  </code></pre>