original_docstring: Parses a string into a list of seasons.
docstring: Parses a string into a list of seasons.
docstring_tokens: Parses a string into a list of seasons .
code: def parse_season_string(season_filter):
      """Parses a string into a list of seasons."""
  
      filtered_seasons = []
  
      # Split string according to commas
      for expr in season_filter.split(","):
          # If expression contains hyphen, return a range of all numbers within
          # that range
          if "-" in expr:
              start, end = expr.split("-")
              filtered_seasons += range(int(start), int(end) + 1)
          else:
              # Otherwise, simple append expression
              filtered_seasons.append(int(expr))
  
      # Return list of seasons as numbers
      return filtered_seasons
code_tokens: def parse_season_string ( season_filter ) : filtered_seasons = [ ] for expr in season_filter . split ( "," ) : if "-" in expr : start , end = expr . split ( "-" ) filtered_seasons += range ( int ( start ) , int ( end ) + 1 ) else : filtered_seasons . append ( int ( expr ) ) return filtered_seasons
short_docstring: Parses a string into a list of seasons.
short_docstring_tokens: Parses a string into a list of seasons .
comment: """Parses a string into a list of seasons."""$SEP$# Split string according to commas$SEP$# If expression contains hyphen, return a range of all numbers within$SEP$# that range$SEP$# Otherwise, simple append expression$SEP$# Return list of seasons as numbers