def solve_it(input_date):
# parse the input
lines = input_data.split('\n')
firstLine = lines[0].split()
item_count = int(firstLine[0])
capacity = int(firstLine[1])
items = []
v = []
w = []
for i in range(1, item_count+1):
line = lines[i]
parts = line.split()
v.append(int(parts[0]))
w.append(int(parts[0]))
for i in range(0,item_count):
items,value,weight = multidict({
i: [v[i],w[i]]})
Now in the last for loop how to i append values or add values to it. I am taking values in from a data file and thus cannot just copy paste the data in the dict need some way to append it. Please help or suggest a alternate way to do so.