Hello,
You can use from collections import OrderedDict
or wait for Python 3.7 to come to Rhino (maybe neverβ¦) 8.3. collections β High-performance container datatypes β Python 2.7.18 documentation
And please donβt use list and dict as variable names because you are overwriting the builtin names
from collections import OrderedDict
my_dict = OrderedDict([("1","a"),("2","b"),("3","c")])
my_dict["4"] = "d"
print my_dict
print my_dict.keys()
Yields:
OrderedDict([(β1β, βaβ), (β2β, βbβ), (β3β, βcβ), (β4β, βdβ)])
[β1β, β2β, β3β, β4β]
Have a great week!