Created
December 23, 2010 23:20
-
-
Save josephmosby/753677 to your computer and use it in GitHub Desktop.
Python function for splitting a string into a list, no delimiters required and all characters/operators together
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def propListBreaker(x): | |
listmsg = re.split(r'(\D)',x) | |
for i in listmsg: | |
try: | |
listmsg.remove("") | |
except: | |
break | |
return listmsg | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment