def list_from_csv(comma_separated_str):
 if comma_separated_str:
  return [v.strip() for v in comma_separated_str.split(',') if v.strip()]
 return []

def list_from_csv ( comma_separated_str ) : if comma_separated_str : return [ v . strip ( ) for v in comma_separated_str . split ( ',' ) if v . strip ( ) ] return [ ]
splits the str given and returns a properly stripped list of the comma separated values .