Python program reads a line prints its statistics