Hey. In the loop I generate objects and write them into the response variable. The specified variable is added to the list. I will give an example:
answer = [] for query in listOfLogs: response = {} response = Request(query) elem = {"response": response, "query": query, 'isNull': False} answer.append(elem) for item1 in answer: print item1 print "###" As a result, for some reason, the list contains references to the response, and with each new creation of the response object, the Request function overwrites all elements of the list. I would like to copy the object to the list, and not to add it by reference. I will give an example of the log:
Луговая Рыбачье ### Луговая (эксп.) Рыбачье Луговая (эксп.) Рыбачье ### ЛуговаяРыбачье ЛуговаяРыбачье ЛуговаяРыбачье ### Ногинск, Горьковское шоссе, 56 км, дом 1 Ногинск, Горьковское шоссе, 56 км, дом 1 Ногинск, Горьковское шоссе, 56 км, дом 1 Ногинск, Горьковское шоссе, 56 км, дом 1 ### Tell me how to do this?
Request()function work? And where is theanswerlist? - kitscribeRequest()? String handles. The story about theanswercorrected - hedgehogues