Hi Kiteh,

Why not use `OrderedDict` in the first place ?
Seems like `list01` and `list02` both from the same scene, if you are able 
to use `OrderedDict` instead of `dict`, you can save the order.
Or, just iterating `list01` and use as key to access the `dict` value, 
isn't that also guaranty the order of the *value* you retrieved, which I 
assume is the final goal ?

kiteh於 2018年10月11日星期四 UTC+8上午3時32分41秒寫道:
>
> Hi everyone,
>
> I have 2 list items which contains the same amount of items, and I am 
> trying to check the order of one list to another.
>
> Eg.
> # This is derived from maya.cmds
> list01 = ['cleve', 'adam', 'yuno', 'pete'] 
>
> # This is derived from dictionary keys in a way it is capturing the same 
> info from the scene but derived very differently
> list02 = ['pete', 'yuno', 'cleve', 'adam'] 
>
>
> I am unable to use `list01 = list02` or something similar, because both 
> lists are called from different applications and hence this question of 
> mine.
> And the reason I had wanted to the order to be the same is so that the 
> application that uses `list02` will populate in the same hierarchical 
> manner as in `list01` (outliner).
>
> And neither would I want to/ can use `sorted` as this will mess up my 
> order. What is the best way to go about this?
>
> P.S: Sorry in advance if this sounds like a very noob question...
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/59db1aa1-a46d-41b2-b61a-3683eafb123e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to