Naive Python script to read and analyse text data