Interning On Request

This runs under CPython.

import sys

a = "".join(["ke", "y"])
b = "".join(["ke", "y"])
print(a is b)

a2 = sys.intern(a)
b2 = sys.intern(b)
print(a2 is b2)

What do the two print calls output?

A

True, then False

B

False, then True

C

True, then True

D

False, then False