Sobes.tech
Junior — Senior

How does string concatenation affect object references in Python

livecode

Task condition

Consider what happens if you construct a string partly from a literal, and the remaining part is added using the + operator. Will the resulting variable point to the same string object as other variables containing the same text?

s1 = "Hello World"
s2 = "Hello World"
s3 = "Hello Wor" + "ld"