Consider the following string mySubject:
mySubject = "Computer Science"
What will be the output of the following string operations :
i. print(mySubject[0:len(mySubject)])
ii. print(mySubject[-7:-1])
iii. print(mySubject[::2])
iv. print(mySubject[len(mySubject)-1])
v. print(2*mySubject)
vi. print(mySubject[::-2])
vii. print(mySubject[:3] + mySubject[3:])
viii. print(mySubject.swapcase())
ix. print(mySubject.startswith('Comp'))
x. print(mySubject.isalpha())
Answers
Answered by
26
Answer:
hi...
your outputs...
Explanation:
i)Computer Science
ii)Scienc
iii)Cmue cec
iv)e
v)Computer ScienceComputer Science
vi)eniSrtpo
vii)Computer Science
viii)cOMPUTER sCIENCE
ix)True
x)False
#hope it helps you
please mark brainliest
Similar questions
English,
4 months ago
Math,
4 months ago
India Languages,
4 months ago
Computer Science,
9 months ago
Computer Science,
9 months ago
Chemistry,
1 year ago
English,
1 year ago
English,
1 year ago