Check out Brian Ewert's excellent tutorials (xyz2 dot net), and check out Anoop A.K 's excellent tutorials (codecg dot com). Reading their work helped me immensely in learning about string arrays, tokenizing, and making selections in Maya and mel.
This is a short demo on a script I made to help with namespace naming. Please see at the beginning some built-in Mel commands that were very useful in writing this script.
This is the current version of the script.