A code word generator written in python 3