I populate a python dictionary based on few conditions,
My question is can we retrieve in the same order as it is populated.
questions_dict={}
data = str(header_arr[opt]) + str(row)
questions_dict.update({data : xl_data})
valid_xl_format = 7
if (type.lower() == "ma" or type.lower() == "mc"):
data = str(header_arr[opt]) + str(row)
questions_dict.update({data : xl_data})
valid_xl_format = 7
After populating if i iterate it is not in the order it is populated
for k in questions_dict:
logging.debug("%s:%s" %(k,questions_dict[k]))