def not_empty(s):
	return s and s.strip()
print(list(filter(not_empty,[' ','A',' ','B'])))
# your code goes here
# your code goes here
# your code goes here