A simple Python program for miscellaneous text processing