What I'm trying to do is get 3 values from a key into separate variables. Currently I'm doing it like this:
for key in names:
posX = names[key][0]
posY = names[key][1]
posZ = names[key][2]
This doesn't seem very intuitive to me even though it works. I've also tried doing this:
for key, value in names:
location = value
Unfortunately, this gives me a single object (which is what I expected), but I need the individual values assigned to the key. Thanks and apologize for my newness to Python.
Update Apologies for not specifying where I was getting my values from. Here is how I'm doing it for the first example.
names = {}
for name in objectNames:
cmds.select(name)
location = cmds.xform(q=True, ws=True, t=True)
names[name] = location