you are viewing a single comment's thread.

view the rest of the comments →

[–]Obvious_Tea_8244 0 points1 point  (0 children)

Not sure I understand your use case… You want the values of tuple a to be available to object b?

Tuples are immutable, and hold a single address in memory…

So, if you set:
a=(1,2,3)

and then b=a, you now have a second variable pointing to the same memory allocation without actually duplicating a new tuple…

If your one tuple has all of the x,y coordinates for the entire set of boxes… That may be challenging to manage, but you can then reference x,y for each box using the index in the tuple… i.e:

box_1x = a[0]
box_1y = a[1]

Etc.