
Nov. 24, 2020
5:09 p.m.
On 11/24/2020 4:40 PM, Marco Sulla wrote:
I have a question about pattern matching: is it used often in math language as Mathematica?
Yes, pattern matching is absolutely fundamental to Mathematica. See the `MatchQ` function: https://reference.wolfram.com/language/ref/MatchQ.html This works brilliantly. I would love for Python to rely on a function to test for matches. To see what match-based actions could then look like, take a look at `Replace`: https://reference.wolfram.com/language/ref/Replace.html fwiw, Alan Isaac