Solved

Consider the Following Code: in [1]: S1 = 'Happy

Question 12

Multiple Choice

Consider the following code: In [1]: s1 = 'happy'
In [2]: s2 = 'birthday'
In [3]: s1 += ' ' + s2
In [4]: s1
Out[4]: 'happy birthday'
In [5]: symbol = '>'
In [6]: symbol *= 5
In [7]: symbol
Out[7]: '>>>>>'
Which snippet(s) in this interactive session appear to modify existing strings, but actually create new string objects?


A) Only snippet [3].
B) Only snippet [5].
C) Both snippets [5] and [6].
D) Both snippets [3] and [6].

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents