Python%20Interview%20Questions%20and%20Answers
Question: How do I modify a string in place?Answer:You can't, because strings are immutable. If you need an object with this ability, try converting the string to a list or use the array module:
|
Is it helpful?
Yes
No
Most helpful rated by users:
- What is Python?
- How do I share global variables across modules?
- How do you set a global variable in a function in Python?
- Why can\'t I use an assignment in an expression?
- What are the rules for local and global variables in Python?