हिंदी

Do you modify a string in Python?

Advertisements

प्रश्न

Do you modify a string in Python?

टिप्पणी लिखिए
Advertisements

उत्तर

  • No, because strings in python are immutable.
  • That means once you define a string, modifications or deletion are not allowed.
  • If we want to modify the string, a new string value can be assigned to the existing string variable.
shaalaa.com
Concepts of Strings in Python
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 8: Strings and String manipulation - Evaluation [पृष्ठ १३०]
Advertisements
Share
Notifications



      Forgot password?
Use app×