NLTK's Strategic Shift: Immutable Inputs to Mutable Processing

While NLTK relies on immutable `str` and `tuple` for stable text representation, it frequently converts these into mutable `list` objects for intermediate processing steps like tokenization, stemming, or parsing. This allows flexible modifications, with results often converted back to immutable forms for consistency.

Sources

Open the full topic