parameters: (val)
return_statement: return lst
docstring: Split a string to a list of elements, where elements are separated by whitespace or commas
      Leading/ending parantheses are stripped.
  
      Returns:
          val: the string to split
  
      Returns:
          casted_dst: the casted list
docstring_summary: Split a string to a list of elements, where elements are separated by whitespace or commas
      Leading/ending parantheses are stripped.
docstring_tokens: Split a string to a list of elements where elements are separated by whitespace or commas Leading / ending parantheses are stripped .
function: def str_to_list(val):
      """
      Split a string to a list of elements, where elements are separated by whitespace or commas
      Leading/ending parantheses are stripped.
  
      Returns:
          val: the string to split
  
      Returns:
          casted_dst: the casted list
      """
      val = val.replace('[', '')
      val = val.replace('(', '')
      val = val.replace(']', '')
      val = val.replace(')', '')
  
      if ',' in val:
          lst = val.split(',')
      else:
          lst = val.split()
  
      return lst
function_tokens: def str_to_list ( val ) : val = val . replace ( '[' , '' ) val = val . replace ( '(' , '' ) val = val . replace ( ']' , '' ) val = val . replace ( ')' , '' ) if ',' in val : lst = val . split ( ',' ) else : lst = val . split ( ) return lst