February 7, 2008
Text speak conversion in Python!
Want to write in txt spk like all the cool mobile-toting kids, but tired of figuring out which letters to leave out? No problem — just run your text through the handy to_txt_spk function!
>>> def to_txt_spk(words):
return "".join(c for c in words if c not in "aeiou")
return "".join(c for c in words if c not in "aeiou")
>>> to_txt_spk("Impress your friends with your text speak skillz!")
'Imprss yr frnds wth yr txt spk skllz!'