Skip to content
Related Articles

Related Articles

Python-Quizzes | Miscellaneous | Question 7
  • Last Updated : 03 Feb, 2016

Given a string s = “Welcome”, which of the following code is incorrect?
(A) print s[0]
(B) print s.lower()
(C) s[1] = ‘r’
(D) print s.strip()

Answer: (C)

Explanation: strings are immutable in Python

Quiz of this Question
Please comment below if you find anything wrong in the above post

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :