Are there pattern matching functions in Python like this?
No there is not, python's pattern matching is only iterable unpacking like this:
>>> (x, y) = (1, 2)
>>> print x, y
1 2
Or in function definition:
>>> def x((x, y)):
...
Or in python 3:
>>> x, *y = (1, 2, 3)
>>> print(x)
1
>>> print(y)
[2, 3]
But there are some of external libraries that realize pattern matching.