Question: Understand that strings are immutable objects in Python and show how to manipulate their contents in an indirect manner by using the assignment operator. What

Understand that strings are immutable objects in Python and show how to manipulate their contents in an indirect manner by using the assignment operator. What does immutable mean? Wait, I thought that concatenation changed strings... Why is this wrong Talk through what the following code is doing. Note that the slicing operation does NOT actually change the state of the oniginal string on which it's operating s "Hello World" idx= s.find(. ') half! s[ : idx) half2 = s[idx+1 : ] news = half! + ' ' + half2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
