MCQ Answer

Given a string s="Welcome", which of the following code is incorrect ?

Given a string s="Welcome", which of the following code is incorrect ?

एक स्ट्रिंग s="Welcome" में निम्नलिखित में से कौन सा कोड गलत है?
Topic : Sequence data types in python

A. print s[0]

B. print s.lower()

C. s[1]='r'

D. print s.strip()




Correct Answer is :

C. s[1]='r'



Explanation
String is immutable i.e. it can't be change in place
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad