Solve the programming task below in a Python markdown code block.
The hamming distance of two equal-length strings is the number of positions, in which the two string differ. In other words, the number of character substitutions required to transform one string into the other. 

For this first Kata, you will write a function ```hamming_distance(a, b)``` with two equal-length strings containing only 0s and 1s as parameters. There is no need to test the parameters for validity (but you can, if you want).The function's output should be the hamming distance of the two strings as an integer.

Example:

```python
hamming_distance('100101', '101001') == 2
hamming_distance('1010', '0101') == 4
```
Also feel free to reuse/extend the following starter code:
```python
def hamming_distance(a, b):
```