If I have
{x->2,y->3,z->19}
and make many calculations and finaly get
First/@FactorInteger[57]
{3, 19}
how can I apply the inversed rules to get
{y,z}
without using
/.{2->x,3->y,19->z}
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityIf I have
{x->2,y->3,z->19}
and make many calculations and finaly get
First/@FactorInteger[57]
{3, 19}
how can I apply the inversed rules to get
{y,z}
without using
/.{2->x,3->y,19->z}
{3, 19} /. Map[Reverse, {x -> 2, y -> 3, z -> 19}]
work? $\endgroup$ – J. M.'s ennui♦ May 11 '17 at 0:48Reverse[rules, {2}]
$\endgroup$ – Coolwater May 11 '17 at 4:20