# Multiple variable assignment from a list

For example in Python, if we have a list of 3 elements, say ls = [1,2,3] and we want to assign a variable to each value (from left to right), one can do as follows: x,y,z = ls where then, x will take the value 1 and so on.

Now if we have a list in Mathematica ls = {1,2,3}, is there an analogous way of performing the simultaneous assignment?

• lst={1,2,3}; {x,y,z}=lst should just work as is? – Nasser Nov 10 '17 at 14:55
• @Nasser Indeed it does, exactly what I was looking for, thanks. Should I remove the post, or would you prefer to add this as an answer and I accept (maybe relevant for future users). – user929304 Nov 10 '17 at 14:58