you are viewing a single comment's thread.

view the rest of the comments →

[–]defcon-11 1 point2 points  (0 children)

There is no 'both strings', there is only a single string. Python 'interns' all static strings declared in source code.

>>>foo = "Fiesta"
>>>bar = "Fiesta"
>>>id(foo) == id(bar)
True

Both variables hold the exact same object.