Skip to main content
added 59 characters in body
Source Link
bill s
  • 70.1k
  • 4
  • 105
  • 200

Replace does workReplaceRepeated is probably what you want. Something like:

G //. {{a, c} -> 1, {a, c, x} -> 2} 

//. is the shortcut for this. ReplaceAll probably also works:

G /. {{a, c} -> 1, {a, c, x} -> 2} 

Replace does work. Something like:

G //. {{a, c} -> 1, {a, c, x} -> 2} 

ReplaceRepeated is probably what you want. Something like:

G //. {{a, c} -> 1, {a, c, x} -> 2} 

//. is the shortcut for this. ReplaceAll probably also works:

G /. {{a, c} -> 1, {a, c, x} -> 2} 
Source Link
bill s
  • 70.1k
  • 4
  • 105
  • 200

Replace does work. Something like:

G //. {{a, c} -> 1, {a, c, x} -> 2}