<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def splitem(query):
 	""" 	Split a query into choices 	['dog', 'cat'] 	Disregards trailing punctuation. 	['dogs', 'cats'] 	['cats'] 	Allow or 	['dogs', 'cats', 'prarie dogs'] 	Honors serial commas 	['dogs', 'cats', 'prarie dogs'] 	Allow choices to be prefixed by some ignored prompt. 	['a', 'b', 'c'] 	"""

	prompt, sep, query = query.rstrip('?.!').rpartition(':')

	choices = query.split(',')
	choices[-1:] = choices[-1].split(' or ')

	return [choice.strip() for choice in choices if choice.strip()]