I always get my dictionary disordering the data , what I'm doing wrong here ?
data={
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
'10': '10',
'11': '11'
}
print data
Result:
{'11': '11', '10': '10', '1': '1', '3': '3', '2': '2', '5': '5', '4': '4', '7':'7', '6': '6', '9': '9', '8': '8'}
What do I have to do to get it in the right order?
PS : that list was just an example my list type is more complicated : data={ 'str1': 'str2', 'str3': 'str4', 'str5': 'str6' ....} how can i keep them in order like i write them in the first place ? with the key:value format