Report Bug

QusGiven a string s="Welcome", which of the following code is incorrect ? Qusएक स्ट्रिंग s="Welcome" में निम्नलिखित में से कौन सा कोड गलत है?


A. print s[0]
B. print s.lower()
C. s[1]='r
D. print s.strip()


Solution
C. s[1]='r



Explanation
String is immutable i.e. it can't be change in place
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad