CBSE Class 11 Computer Science Question 59 of 91

String Manipulation — Question 4

Back to all questions
4
Question

Question 1d

What is the result of the following expression?

s = '0123456789'
print(s[3], ", ", s[0 : 3], " - ", s[2 : 5])
print(s[:3], " - ", s[3:], ", ", s[3:100])
print(s[20:], s[2:1], s[1:1])

Answer

3 ,  012  -  234
012  -  3456789 ,  3456789

Answer