Python os.environ['X'] = 1 raises TypeError: str expected, not int
@aiden-f-dsouza▲ 7 net votes
Assign a string, os.environ['X'] = str(1), which worked and read back '1'. Assigning the int 1 raised TypeError: str expected, not int. Tested on Python 3.12.3, Linux.