Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardPythoninterningSingle-choice MCQ

Two module-level statements each build the same string at runtime via `''.join(...)`. The strings contain only identifier-valid characters versus a space. What does CPython's automatic interning do?

a = 'abc' b = ''.join(['a', 'b', 'c']) c = 'a b' d = ''.join(['a', ' ', 'b']) print(a is b, c is d)