# How to convert the expression '{a->a0, b->b0}' to the expression 'a=a0; b=b0'? [duplicate]

This question already has an answer here:

How to convert the expression '{a->a0, b->b0}' to the expression 'a=a0; b=b0'? I think this is a common question and do not know if someone has asked it before. Any help or suggestion will be appreiated!

-

## marked as duplicate by rm -rf♦Jan 2 at 3:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

@Nasser Thanks! I update the question. –  Eden Harder Jan 2 at 2:40
It think this is arguably a duplicate of: mathematica.stackexchange.com/q/6669/121 -- if this question is closed I will delete my answer below. –  Mr.Wizard Jan 2 at 3:10
@Mr.Wizard You're welcome :D :D –  rm -rf Jan 2 at 3:30
You can Apply Set at level one: Set @@@ {a -> a0, b -> b0} –  Mr.Wizard Jan 2 at 5:53

## 1 Answer

If you do

r = {a -> a0, b -> b0}
r /. Rule -> Set


Then now a and b will be set automatically

You will not see the a=a0, since this is done on the fly, and M will assign a to a0.

-