IntroCModelingLA/Code/stattools.py
def puncTrim(word):
	"""Eliminates spaces and punctuation marks left and right of words."""
	word = string.strip(word)
	if len(word) > 0:
		while word[0] in string.punctuation + "1234567890":
			word = word[1:]
			if word == "":
				break
	if len(word) > 0:
		while word[-1] in string.punctuation:
			word = word[:-1]
			if word == "":
				break	
	return word
Eliminates spaces and punctuation marks left and right of words.
Eliminates spaces and punctuation marks left and right of words.
Eliminates spaces and punctuation marks left and right of words .
def puncTrim(word):
	word = string.strip(word)
	if len(word) > 0:
		while word[0] in string.punctuation + "1234567890":
			word = word[1:]
			if word == "":
				break
	if len(word) > 0:
		while word[-1] in string.punctuation:
			word = word[:-1]
			if word == "":
				break	
	return word
def puncTrim ( word ) : word = string . strip ( word ) if len ( word ) > 0 : while word [ 0 ] in string . punctuation + "1234567890" : word = word [ 1 : ] if word == "" : break if len ( word ) > 0 : while word [ - 1 ] in string . punctuation : word = word [ : - 1 ] if word == "" : break return word
Eliminates spaces and punctuation marks left and right of words.
Eliminates spaces and punctuation marks left and right of words .
"""Eliminates spaces and punctuation marks left and right of words."""
word