I am creating the following
aData = []
# get my data from database
for row in rows:
aData.append({row["tierid"]:"name":row["tiername"],"description":row["tierdesc"],"option":row["tieroption"],"price":str(row["tierprice"])}})
when I display the output the order the data was entered is not what is
displayed
{'BBS': {'option': 'Small', 'description': 'Broadband Bundle', 'name':
'Broadband', 'price': '179.00
{'BBM': {'option': 'Medium', 'description': 'Broadband Bundle', 'name':
'Broadband', 'price': '215.0
{'BBL': {'option': 'Large', 'description': 'Broadband Bundle', 'name':
'Broadband', 'price': '295.00
as you can see the option element was added third but is the first one
displayed.
Is this just standard - I am using Python 3.5
Regards
Colin
--
https://mail.python.org/mailman/listinfo/python-list