make python scripts python3 compatible

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
python: calculate fitness of new child

Using the fitness level of the parent results in an extra generation
being created, which at best is still a perfect match to the target
string and at worst actually "devolves" into an incorrect one.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
python: calculate fitness only once per child

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
python: make fitness() more pythonic

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
python-2: replace manual loop with max()

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
python-2: move match check to loop condition

Prevents extra generations in the unlikely event that the starting
string matches the target.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Merge pull request #17 from andrewgregory/python

Python