Python pattern matching like functional languages.