Use a utility function to cleanly read input from the user

Not really, it's just a style thing - typically this is how I've seen py2/py3 compatibility functions defined in the past. A minor benefit is that it avoids the overhead of a conditional in the definition (trivial in terms of performance, but a bit more relevant in terms of understanding when you read the code, IMO).

I'd prefer to leave it like this, but can change if necessary.