Python 2's Dual String Nature vs. Python 3's Unified Text

Python 2 distinguished between `str` (byte sequences) and `unicode` (textual data), requiring explicit encoding/decoding. Python 3 unified `str` as native Unicode text and introduced `bytes` for raw byte sequences, enforcing a clearer separation and eliminating implicit conversions.

Sources

Open the full topic