A question about pattern matching

Nov. 24, 2020
9:40 p.m.
Excuse me, I have a question about pattern matching: is it used often in math language as Mathematica? May it help to translate code from such languages to Python?

November 2020
10: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
1613
Age (days ago)
1613
Last active (days ago)
1 comments
2 participants
participants (2)
-
Alan G. Isaac
-
Marco Sulla